summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
Commit message (Collapse)AuthorAgeFilesLines
...
* [CodeView] Finish decoupling TypeDatabase from TypeDumper.Zachary Turner2017-01-114-539/+571
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the type dumper itself was passed around to a lot of different places and manipulated in ways that were more appropriate on the type database. For example, the entire TypeDumper was passed into the symbol dumper, when all the symbol dumper wanted to do was lookup the name of a TypeIndex so it could print it. That's what the TypeDatabase is for -- mapping type indices to names. Another example is how if the user runs llvm-pdbdump with the option to dump symbols but not types, we still have to visit all types so that we can print minimal information about the type of a symbol, but just without dumping full symbol records. The way we did this before is by hacking it up so that we run everything through the type dumper with a null printer, so that the output goes to /dev/null. But really, we don't need to dump anything, all we want to do is build the type database. Since TypeDatabaseVisitor now exists independently of TypeDumper, we can do this. We just build a custom visitor callback pipeline that includes a database visitor but not a dumper. All the hackery around printers etc goes away. After this patch, we could probably even delete the entire CVTypeDumper class since really all it is at this point is a thin wrapper that hides the details of how to build a useful visitation pipeline. It's not a priority though, so CVTypeDumper remains for now. After this patch we will be able to easily plug in a different style of type dumper by only implementing the proper visitation methods to dump one-line output and then sticking it on the pipeline. Differential Revision: https://reviews.llvm.org/D28524 llvm-svn: 291724
* Remove all variants of DWARFDie::getAttributeValueAs...() that had ↵Greg Clayton2017-01-112-45/+10
| | | | | | | | | | parameters that specified default values. Now we only support returning Optional<> values and have changed all clients over to use Optional::getValueOr(). Differential Revision: https://reviews.llvm.org/D28569 llvm-svn: 291686
* [lib/Object] - Introduce Decompressor class.George Rimar2017-01-111-66/+12
| | | | | | | | | | | | | Decompressor intention is to reduce duplication of code. Currently LLD has own implementation of decompressor for compressed debug sections. This class helps to avoid it and share the code. LLD patch for reusing it is D28106 Differential revision: https://reviews.llvm.org/D28105 llvm-svn: 291675
* [CodeView/PDB] Rename a bunch of files.Zachary Turner2017-01-113-10/+7
| | | | | | | | | | | We were starting to get some name clashes between llvm-pdbdump and the common CodeView framework, so I took this opportunity to rename a bunch of files to more accurately describe their usage. This also helps in llvm-pdbdump to distinguish between different files and whether they are used for pretty dump mode or raw dump mode. llvm-svn: 291627
* [CodeView] Add TypeDatabase class.Zachary Turner2017-01-114-226/+441
| | | | | | | | | | | | | | This creates a centralized class in which to store type records. It stores types as an array of entries, which matches the notion of a type stream being a topologically sorted DAG. Logic to build up such a database was already being used in CVTypeDumper, so CVTypeDumper is now updated to to read from a TypeDatabase which is filled out by an earlier visitor in the pipeline. Differential Revision: https://reviews.llvm.org/D28486 llvm-svn: 291626
* DebugInfo: support for DW_FORM_implicit_constVictor Leschuk2017-01-103-9/+32
| | | | | | | | | | | | Support for DW_FORM_implicit_const DWARFv5 feature. When this form is used attribute value goes to .debug_abbrev section (as SLEB). As this form would break any debug tool which doesn't support DWARFv5 it is guarded by dwarf version check. Attempt to use this form with dwarf version <= 4 is considered a fatal error. Differential Revision: https://reviews.llvm.org/D28456 llvm-svn: 291599
* Add iterator support to DWARFDie to allow child DIE iteration.Greg Clayton2017-01-051-4/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D28303 llvm-svn: 291194
* [cmake] Add LLVM_ENABLE_DIA_SDK option, and expose it in LLVMConfigMichal Gorny2017-01-022-4/+4
| | | | | | | | | | | | | | | Add an explicit LLVM_ENABLE_DIA_SDK option to control building support for DIA SDK-based debugging. Control its value to match whether DIA SDK support was found and expose it in LLVMConfig (alike LLVM_ENABLE_ZLIB). Its value is needed for LLDB to determine whether to run tests requiring DIA support. Currently it is obtained from llvm/Config/config.h; however, this file is not available for standalone builds. Following this change, LLDB will be modified to use the value from LLVMConfig. Differential Revision: https://reviews.llvm.org/D26255 llvm-svn: 290818
* [ObjectYAML] Support for DWARF debug_info sectionChris Bieneman2016-12-221-0/+12
| | | | | | | | | | This patch adds support for YAML<->DWARF for debug_info sections. This re-lands r290147, reverted in 290148, re-landed in r290204 after fixing the issue that caused bots to fail (thank you UBSan!), and reverted again in r290209 due to failures on big endian systems. After adding support for preserving endianness, this should be good now. llvm-svn: 290386
* Add the ability for DWARFDie objects to get the parent DWARFDie.Greg Clayton2016-12-213-36/+56
| | | | | | | | | | | | In order for the llvm DWARF parser to be used in LLDB we will need to be able to get the parent of a DIE. This patch adds that functionality by changing the DWARFDebugInfoEntry class to store a depth field instead of a sibling index. Using a depth field allows us to easily calculate the sibling and the parent without increasing the size of DWARFDebugInfoEntry. I tested llvm-dsymutil on a debug version of clang where this fully parses DWARF in over 1200 .o files to verify there was no serious regression in performance. Added a full suite of unit tests to test this functionality. Differential Revision: https://reviews.llvm.org/D27995 llvm-svn: 290274
* Revert "[ObjectYAML] Support for DWARF debug_info section"Chris Bieneman2016-12-201-12/+0
| | | | | | | | | | | This reverts commit r290204. Still breaking bots... In a meeting now, so I can't fix it immediately. Bot URL: http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/2415 llvm-svn: 290209
* [ObjectYAML] Support for DWARF debug_info sectionChris Bieneman2016-12-201-0/+12
| | | | | | | | This patch adds support for YAML<->DWARF for debug_info sections. This re-lands r290147, after fixing the issue that caused bots to fail (thank you UBSan!). llvm-svn: 290204
* Revert "[ObjectYAML] Support for DWARF debug_info section"Chris Bieneman2016-12-201-12/+0
| | | | | | | | This reverts commit r290147. This commit is breaking a bot (http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/621). I don't have time to investigate at the moment, so I'll revert for now. llvm-svn: 290148
* [ObjectYAML] Support for DWARF debug_info sectionChris Bieneman2016-12-201-0/+12
| | | | | | This patch adds support for YAML<->DWARF for debug_info sections. llvm-svn: 290147
* Make a function to correctly extract the DW_AT_high_pc given the low pc value.Greg Clayton2016-12-191-13/+22
| | | | | | | | DWARF 4 and later supports encoding the PC as an address or as as offset from the low PC. Clients using DWARFDie should be insulated from how to extract the high PC value. This function takes care of extracting the form value and looking for the correct form. Differential Revision: https://reviews.llvm.org/D27885 llvm-svn: 290131
* [PDB] Don't use the long typeDavid Majnemer2016-12-181-1/+1
| | | | | | | | Long is not the same size across a number of the platforms we support. Use unsigned int here instead, it is more appropriate because overflow/wrap-around is possible and, in this case, expected. llvm-svn: 290068
* [PDB] Don't reimplement CRC32David Majnemer2016-12-181-50/+5
| | | | | | | We already have a CRC32 implementation which is compatible with the PDB hash, reuse it. llvm-svn: 290054
* [PDB] Validate superblock addressesDavid Majnemer2016-12-181-0/+9
| | | | | | | - Validate the address of the block map. - Validate the address of the free block map. llvm-svn: 290053
* [DWARF] - Introduce DWARFDebugPubTable class for dumping pub* sections.George Rimar2016-12-173-41/+77
| | | | | | | | | | Patch implements parser of pubnames/pubtypes tables instead of static function used before. It is now should be possible to reuse it in LLD or other projects and clean up the duplication code. Differential revision: https://reviews.llvm.org/D27851 llvm-svn: 290040
* Delete unused file.Zachary Turner2016-12-172-2/+0
| | | | llvm-svn: 290021
* Resubmit "[CodeView] Hook CodeViewRecordIO for reading/writing symbols."Zachary Turner2016-12-165-145/+629
| | | | | | | The original patch was broken due to some undefined behavior as well as warnings that were triggering -Werror. llvm-svn: 290000
* Revert "[CodeView] Hook CodeViewRecordIO for reading/writing symbols."Zachary Turner2016-12-165-629/+145
| | | | | | | This reverts commit r289978, which is failing due to some rebase/merge issues. llvm-svn: 289981
* [CodeView] Hook CodeViewRecordIO for reading/writing symbols.Zachary Turner2016-12-165-145/+629
| | | | | | | | | This is the 3rd of 3 patches to get reading and writing of CodeView symbol and type records to use a single codepath. Differential Revision: https://reviews.llvm.org/D26427 llvm-svn: 289978
* Revert "dwarfdump: Support/process relocations on a CU's abbrev_off"David Blaikie2016-12-161-3/+0
| | | | | | | | | Reverting because this breaks lld's gdb_index support - it's probably double counting the abbrev relocation offset. This reverts commit r289954. llvm-svn: 289961
* dwarfdump: Support/process relocations on a CU's abbrev_offDavid Blaikie2016-12-161-0/+3
| | | | | | | | | | Input can be produced by ld -r, for example (a normal LLVM workflow never hits this - LLVM only ever produces a single abbrev table in an object (shared by multiple CUs), so the reloc's always 0, and when it's linked together the relocation's resolved so it doesn't need to be handled) llvm-svn: 289954
* Add the ability to get attribute values as Optional<T>Greg Clayton2016-12-143-65/+94
| | | | | | | | | | | | | | | | | | | | | | When getting attributes it is sometimes nicer to use Optional<T> some of the time instead of magic values. I tried to cut over to only using the Optional values but it made many of the call sites very messy, so it makes sense the leave in the calls that can return a default value. Otherwise code that looks like this: uint64_t CallColumn = Die.getAttributeValueAsAddress(DW_AT_call_line, 0); Has to be turned into: uint64_t CallColumn = 0; if (auto CallColumnValue = Die.getAttributeValueAsAddress(DW_AT_call_line)) CallColumn = *CallColumnValue; The first snippet of code looks much better. But in cases where you want an offset that may or may not be there, the following code looks better: if (auto StmtOffset = Die.getAttributeValueAsSectionOffset(DW_AT_stmt_list)) { // Use StmtOffset } Differential Revision: https://reviews.llvm.org/D27772 llvm-svn: 289731
* This change does two things:Eric Christopher2016-12-141-0/+1
| | | | | | | | | | | | | Adds a "Discriminator" field to struct DILineInfo, which defaults to 0. Fills out the "Discriminator" field in DILineInfo in DWARFDebugLine::LineTable::getFileLineInfoForAddress(). in order to have a slightly nicer interface in getFileLineInfoForAddress. Patch by Simon Que! Differential Revision: https://reviews.llvm.org/D27649 llvm-svn: 289683
* Switch functions that returned bool and filled in a DWARFFormValue arg with ↵Greg Clayton2016-12-133-36/+33
| | | | | | | | ones that return Optional<DWARFFormValue> Differential Revision: https://reviews.llvm.org/D27737 llvm-svn: 289611
* Make a DWARFDIE class that can help avoid using the wrong DWARFUnit when ↵Greg Clayton2016-12-137-476/+462
| | | | | | | | | | | | extracting attributes Many places pass around a DWARFDebugInfoEntryMinimal and a DWARFUnit. It is easy to get things wrong by using the wrong DWARFUnit with a DWARFDebugInfoEntryMinimal. This patch creates a DWARFDie class that contains the DWARFUnit and DWARFDebugInfoEntryMinimal objects so that they can't get out of sync. All attribute extraction has been moved out of DWARFDebugInfoEntryMinimal and into DWARFDie. DWARFDebugInfoEntryMinimal was also renamed to DWARFDebugInfoEntry. DWARFDie objects are temporary objects that are used by clients and contain 2 pointers that you always need to have anyway. Keeping them grouped will avoid errors and simplify many of the attribute extracting APIs by not having to pass in a DWARFUnit. Differential Revision: https://reviews.llvm.org/D27634 llvm-svn: 289565
* Make a DWARF generator so we can unit test DWARF APIs with gtest.Greg Clayton2016-12-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only tests we have for the DWARF parser are the tests that use llvm-dwarfdump and expect output from textual dumps. More DWARF parser modification are coming in the next few weeks and I wanted to add tests that can verify that we can encode and decode all form types, as well as test some other basic DWARF APIs where we ask DIE objects for their children and siblings. DwarfGenerator.cpp was added in the lib/CodeGen directory. This file contains the code necessary to easily create DWARF for tests: dwarfgen::Generator DG; Triple Triple("x86_64--"); bool success = DG.init(Triple, Version); if (!success) return; dwarfgen::CompileUnit &CU = DG.addCompileUnit(); dwarfgen::DIE CUDie = CU.getUnitDIE(); CUDie.addAttribute(DW_AT_name, DW_FORM_strp, "/tmp/main.c"); CUDie.addAttribute(DW_AT_language, DW_FORM_data2, DW_LANG_C); dwarfgen::DIE SubprogramDie = CUDie.addChild(DW_TAG_subprogram); SubprogramDie.addAttribute(DW_AT_name, DW_FORM_strp, "main"); SubprogramDie.addAttribute(DW_AT_low_pc, DW_FORM_addr, 0x1000U); SubprogramDie.addAttribute(DW_AT_high_pc, DW_FORM_addr, 0x2000U); dwarfgen::DIE IntDie = CUDie.addChild(DW_TAG_base_type); IntDie.addAttribute(DW_AT_name, DW_FORM_strp, "int"); IntDie.addAttribute(DW_AT_encoding, DW_FORM_data1, DW_ATE_signed); IntDie.addAttribute(DW_AT_byte_size, DW_FORM_data1, 4); dwarfgen::DIE ArgcDie = SubprogramDie.addChild(DW_TAG_formal_parameter); ArgcDie.addAttribute(DW_AT_name, DW_FORM_strp, "argc"); // ArgcDie.addAttribute(DW_AT_type, DW_FORM_ref4, IntDie); ArgcDie.addAttribute(DW_AT_type, DW_FORM_ref_addr, IntDie); StringRef FileBytes = DG.generate(); MemoryBufferRef FileBuffer(FileBytes, "dwarf"); auto Obj = object::ObjectFile::createObjectFile(FileBuffer); EXPECT_TRUE((bool)Obj); DWARFContextInMemory DwarfContext(*Obj.get()); This code is backed by the AsmPrinter code that emits DWARF for the actual compiler. While adding unit tests it was discovered that DIEValue that used DIEEntry as their values had bugs where DW_FORM_ref1, DW_FORM_ref2, DW_FORM_ref8, and DW_FORM_ref_udata forms were not supported. These are all now supported. Added support for DW_FORM_string so we can emit inlined C strings. Centralized the code to unique abbreviations into a new DIEAbbrevSet class and made both the dwarfgen::Generator and the llvm::DwarfFile classes use the new class. Fixed comments in the llvm::DIE class so that the Offset is known to be the compile/type unit offset. DIEInteger now supports more DW_FORM values. There are also unit tests that cover: Encoding and decoding all form types and values Encoding and decoding all reference types (DW_FORM_ref1, DW_FORM_ref2, DW_FORM_ref4, DW_FORM_ref8, DW_FORM_ref_udata, DW_FORM_ref_addr) including cross compile unit references with that go forward one compile unit and backward on compile unit. Differential Revision: https://reviews.llvm.org/D27326 llvm-svn: 289010
* [pdb] handle missing pdb streams more gracefullyBob Haarman2016-12-052-30/+75
| | | | | | | | | | | | Summary: The code we use to read PDBs assumed that streams we ask it to read exist, and would read memory outside a vector and crash if this wasn't the case. This would, for example, cause llvm-pdbdump to crash on PDBs generated by lld. This patch handles such cases more gracefully: the PDB reading code in LLVM now reports errors when asked to get a stream that is not present, and llvm-pdbdump will report missing streams and continue processing streams that are present. Reviewers: ruiu, zturner Subscribers: thakis, amccarth Differential Revision: https://reviews.llvm.org/D27325 llvm-svn: 288722
* [DebugInfo] Fix some Clang-tidy modernize-use-default and Include What You ↵Eugene Zelenko2016-11-2318-125/+166
| | | | | | | | Use warnings; other minor fixes (NFC). Per Zachary Turner and Mehdi Amini suggestion to make only post-commit reviews. llvm-svn: 287838
* Remove PDBFileBuilder::build() and related functions.Rui Ueyama2016-11-224-103/+0
| | | | | | | | | | | | | | | | | | | PDBFileBuilder supports two different ways to create files. One is PDBFileBuilder::commit. That function takes a filename and write a result to the file. The other is PDBFileBuilder::build. That returns a new PDBFile object. This patch removes the latter because no one is using it and in a real life situation we are very unlikely to need it. Even if you need it, it'd be easy to write a new PDB to a memory buffer and read it back. Removing PDBFileBuilder::build enables us to remove other classes build transitively. Differential Revision: https://reviews.llvm.org/D26987 llvm-svn: 287697
* Align Modi and FileInfo substreams on 32-byte offsets.Rui Ueyama2016-11-161-4/+4
| | | | | | | | | | This is required by DbiStream, but DbiStreamBuilder didn't align these substreams, so the output of DbiSTreamBuilder couldn't be read by DbiStream. Test will be added to LLD. llvm-svn: 287067
* Fix Modi and File count if there are more than 65535 modules/files.Rui Ueyama2016-11-161-2/+2
| | | | | | | | These numbers are intended to be capped at 65535, but `std::max<uint16_t>(UINT16_MAX, N)` always returns N for any N because the expression is the same as `std::max((uint16_t)UINT16_MAX, (uint16_t)N)`. llvm-svn: 287060
* Improve DWARF parsing speed by improving DWARFAbbreviationDeclarationGreg Clayton2016-11-153-36/+132
| | | | | | | | | | | | | | | | | | | | This patch gets a DWARF parsing speed improvement by having DWARFAbbreviationDeclaration instances know if they have a fixed byte size. If an abbreviation has a fixed byte size that can be calculated given a DWARFUnit, then parsing a DIE becomes two steps: parse ULEB128 abbrev code, and then add constant size to the offset. This patch also adds a fixed byte size to each DWARFAbbreviationDeclaration::AttributeSpec so that attributes can quickly skip their values if needed without the need to lookup the fixed for size. Notable improvements: - DWARFAbbreviationDeclaration::findAttributeIndex() now returns an Optional<uint32_t> instead of a uint32_t and we no longer have to look for the magic -1U return value - Optional<uint32_t> DWARFAbbreviationDeclaration::findAttributeIndex(dwarf::Attribute attr) const; - DWARFAbbreviationDeclaration now has a getAttributeValue() function that extracts an attribute value given a DIE offset that takes advantage of the DWARFAbbreviationDeclaration::AttributeSpec::ByteSize - bool DWARFAbbreviationDeclaration::getAttributeValue(const uint32_t DIEOffset, const dwarf::Attribute Attr, const DWARFUnit &U, DWARFFormValue &FormValue) const; - A DWARFAbbreviationDeclaration instance can return a fixed byte size for itself so DWARF parsing is faster: - Optional<size_t> DWARFAbbreviationDeclaration::getFixedAttributesByteSize(const DWARFUnit &U) const; - Any functions that used to take a "const DWARFUnit *U" that would crash if U was NULL now take a "const DWARFUnit &U" and are only called with a valid DWARFUnit Differential Revision: https://reviews.llvm.org/D26567 llvm-svn: 286924
* Remove extra semicolon.Rui Ueyama2016-11-121-1/+1
| | | | llvm-svn: 286688
* Define DbiStreamBuilder::addSectionContribs.Rui Ueyama2016-11-111-3/+40
| | | | | | | | | | | | | | This patch defines a new function to add a SectionContribs stream to a PDB file. Unlike SectionMap, SectionContribs contains a list of input sections as opposed to output sections. Note that this patch needs improving because currently we do not set Module field in SectionContribs entries. In a follow-up patch, I'll add Modules and then fix it after that. Differential Revision: https://reviews.llvm.org/D26210 llvm-svn: 286677
* Fixed issues found by Paul Robinson with my patch for:Greg Clayton2016-11-111-4/+7
| | | | | | | | | | https://reviews.llvm.org/D26526 - Fixed DW_FORM_strp to be correctly sized and extracted for DWARF64 - Added some missing strp variants as well - Fixed comment typo llvm-svn: 286603
* Clean up DWARFFormValue by reducing duplicated code and removing ↵Greg Clayton2016-11-112-182/+235
| | | | | | | | | | | | | | | | | | | | | DWARFFormValue::getFixedFormSizes() In preparation for a follow on patch that improves DWARF parsing speed, clean up DWARFFormValue so that we have can get the fixed byte size of a form value given a DWARFUnit or given the version, address byte size and dwarf32/64. This patch cleans up code so that everyone is using one of the new DWARFFormValue functions: static Optional<uint8_t> DWARFFormValue::getFixedByteSize(dwarf::Form Form, const DWARFUnit *U = nullptr); static Optional<uint8_t> DWARFFormValue::getFixedByteSize(dwarf::Form Form, uint16_t Version, uint8_t AddrSize, bool Dwarf32); This patch changes DWARFFormValue::skipValue() to rely on the output of DWARFFormValue::getFixedByteSize(...) instead of duplicating the code in each function. This will reduce the number of changes we need to make to DWARF to fewer places in DWARFFormValue when we add support for new form. This patch also starts to support DWARF64 so that we can get correct byte sizes for forms that vary according the DWARF 32/64. To reduce the code duplication a new FormSizeHelper pure virtual class was created that can be created as a FormSizeHelperDWARFUnit when you have a DWARFUnit, or FormSizeHelperManual where you manually specify the DWARF version, address byte size and DWARF32/DWARF64. There is now a single implementation of a function that gets the fixed byte size (instead of two where one took a DWARFUnit and one took the DWARF version, address byte size and DWARFFormat enum) and one function to skip the form values. https://reviews.llvm.org/D26526 llvm-svn: 286597
* Fix some size_t / uint32_t ambiguity errors.Zachary Turner2016-11-081-7/+7
| | | | llvm-svn: 286305
* [CodeView] Hook up CodeViewRecordIO to type serialization path.Zachary Turner2016-11-0813-850/+374
| | | | | | | | | | | | Previously support had been added for using CodeViewRecordIO to read (deserialize) CodeView type records. This patch adds support for writing those same records. With this patch, reading and writing of CodeView type records finally uses a single codepath. Differential Revision: https://reviews.llvm.org/D26253 llvm-svn: 286304
* PDB: Fix some APIs to avoid use-after-freesJustin Bogner2016-11-034-14/+13
| | | | | | | The buffer is already owned by the PDBFile for all of these APIs, so don't pass it in separately. llvm-svn: 285953
* Add CodeViewRecordIO for reading and writing.Zachary Turner2016-11-029-436/+657
| | | | | | | | | | | | | | | Using a pattern similar to that of YamlIO, this allows us to have a single codepath for translating codeview records to and from serialized byte streams. The current patch only hooks this up to the reading of CodeView type records. A subsequent patch will hook it up for writing of CodeView type records, and then a third patch will hook up the reading and writing of CodeView symbols. Differential Revision: https://reviews.llvm.org/D26040 llvm-svn: 285836
* Define DbiStreamBuilder::addSectionMap.Rui Ueyama2016-10-311-2/+85
| | | | | | | | | | | | | This change enables LLD to construct a Section Map stream in a PDB file. I do not understand all these fields in the Section Map yet, but it seems like a copy of a COFF section header in another format. With this patch, DbiStreamBuilder can emit a Section Map which llvm-pdbdump can dump. Differential Revision: https://reviews.llvm.org/D26112 llvm-svn: 285606
* Modify DWARFFormValue to remember the DWARFUnit that it was decoded with.Greg Clayton2016-10-314-32/+36
| | | | | | | | Modifying DWARFFormValue to remember the DWARFUnit that it was encoded with can simplify the usage of instances of this class. Previously users would have to try and pass in the same DWARFUnit that was used to decode the form value and there was a possibility that a different DWARFUnit might be supplied to the functions that extract values (strings, CU relative references, addresses) and cause problems. This fixes this potential issue by storing the DWARFUnit inside the DWARFFormValue so that this mistake can't be made. Instances of DWARFFormValue are not stored permanently and are used as temporary values, so the increase in size of an instance of DWARFFormValue isn't a big deal. This makes decoding form values more bullet proof and is a change that will be used by future modifications. https://reviews.llvm.org/D26052 llvm-svn: 285594
* Define calculateDbgStreamSize for consistency.Rui Ueyama2016-10-291-1/+5
| | | | llvm-svn: 285487
* Import/update constants from the DWARF 5 public review draft document.Adrian Prantl2016-10-283-4/+4
| | | | | | https://reviews.llvm.org/D26051 llvm-svn: 285421
* Switch all DWARF variables for tags, attributes and forms over to use the ↵Greg Clayton2016-10-274-37/+47
| | | | | | | | llvm::dwarf enumerations instead of using raw uint16_t values. This allows easier debugging as users can see the values of the enumerations in the variables view that will show the enumeration string instead of just a number. https://reviews.llvm.org/D26013 llvm-svn: 285309
* [codeview] support emitting indirect virtual base class informationBob Haarman2016-10-251-2/+2
| | | | | | | | | | | | | | | | Summary: Fixes PR28281. MSVC lists indirect virtual base classes in the field list of a class, using LF_IVBCLASS records. This change makes LLVM emit such records when processing DW_TAG_inheritance tags with the DIFlagVirtual and (newly introduced) DIFlagIndirect tags. Reviewers: rnk, ruiu, zturner Differential Revision: https://reviews.llvm.org/D25578 llvm-svn: 285130
OpenPOWER on IntegriCloud