summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/COFF
Commit message (Collapse)AuthorAgeFilesLines
...
* Emit CodeView type records for nested classes.Adrian McCarthy2016-07-061-0/+98
| | | | | | Differential Revision: http://reviews.llvm.org/D21939 llvm-svn: 274629
* [codeview] Set the Nested and Scoped ClassOptions based on the scope chainReid Kleckner2016-07-023-6/+12
| | | | | | These are set on both the declaration record and the definition record. llvm-svn: 274410
* [CodeView] Include the offset of nested membersDavid Majnemer2016-07-011-0/+61
| | | | | | | | | | | | | Given something like: struct S { int a; struct { int b; }; }; We would fail to give 'b' offset 4. Instead, we would give it the offset it has inside of it's struct. llvm-svn: 274400
* [CodeView] Pretty print anonymous scopesDavid Majnemer2016-07-012-2/+13
| | | | | | | | A namespace without a name should be written out as `anonymous namespace' while a tag type without a name should be written out as <unnamed-tag>. llvm-svn: 274399
* [codeview] Don't record UDTs for anonymous structsReid Kleckner2016-07-011-53/+68
| | | | | | | | MSVC makes up names for these anonymous structs, but we don't (yet). Eventually Clang should use getTypedefNameForAnonDecl() to put some name in the debug info, and we can update the test case when that happens. llvm-svn: 274391
* Do not count debug instructions when counting number of uses to reorder ↵Dehao Chen2016-07-011-14/+14
| | | | | | | | | | | | | | frame objects. Summary: The code generation should be independent of the debug info. Reviewers: zansari, davidxl, mkuper, majnemer Subscribers: majnemer, llvm-commits Differential Revision: http://reviews.llvm.org/D21911 llvm-svn: 274357
* [codeview] Add DISubprogram::ThisAdjustmentReid Kleckner2016-07-011-0/+441
| | | | | | | | | | | | | | | | | | | | | Summary: This represents the adjustment applied to the implicit 'this' parameter in the prologue of a virtual method in the MS C++ ABI. The adjustment is always zero unless multiple inheritance is involved. This increases the size of DISubprogram by 8 bytes, unfortunately. The adjustment really is a signed 32-bit integer. If this size increase is too much, we could probably win it back by splitting out a subclass with info specific to virtual methods (virtuality, vindex, thisadjustment, containingType). Reviewers: aprantl, dexonsmith Subscribers: aaboud, amccarth, llvm-commits Differential Revision: http://reviews.llvm.org/D21614 llvm-svn: 274325
* [CodeView] Implement support for bitfields in LLVMDavid Majnemer2016-06-301-0/+215
| | | | | | | | | | | | | CodeView need to know the offset of the storage allocation for a bitfield. Encode this via the "extraData" field in DIDerivedType and introduced a new flag, DIFlagBitField, to indicate whether or not a member is a bitfield. This fixes PR28162. Differential Revision: http://reviews.llvm.org/D21782 llvm-svn: 274200
* Revert r273807 (and r273809, r273810), it caused PR28311Nico Weber2016-06-261-191/+0
| | | | llvm-svn: 273815
* [codeview] Improved array type support.Amjad Aboud2016-06-261-0/+191
| | | | | | | | | | | Added support for: 1. Multi dimension array. 2. Array of structure type, which previously was declared incompletely. 3. Dynamic size array. Differential Revision: http://reviews.llvm.org/D21526 llvm-svn: 273807
* [codeview] Emit parameter variables in the right orderReid Kleckner2016-06-242-4/+126
| | | | | | | | | | Clang emits them in reverse order to conform to the ABI, which requires left-to-right destruction. As a result, the order doesn't fall out naturally, and we have to sort things out in the backend. Fixes PR28213 llvm-svn: 273696
* [codeview] Emit base class information from DW_TAG_inheritance nodesReid Kleckner2016-06-242-22/+342
| | | | | | | | | | | | | | | | There are two remaining issues here: 1. No vbptr information 2. Need to mention indirect virtual bases Getting indirect virtual bases is just a matter of adding an "indirect" flag, emitting them in the frontend, and ignoring them when appropriate for DWARF. All virtual bases use the same artificial vbptr field, so I think the vbptr offset will be best represented by an implicit __vbptr$ClassName member similar to our existing __vptr$ member. llvm-svn: 273688
* [codeview] Add classes and unions to the Local/Global UDTs listsHans Wennborg2016-06-231-14/+81
| | | | | | Differential Revision: http://reviews.llvm.org/D21655 llvm-svn: 273626
* [codeview] Fix letter casing in FileCheck regexesHans Wennborg2016-06-231-3/+3
| | | | | | We print those hex numbers with uppercase letters. llvm-svn: 273594
* [codeview] Emit retained typesHans Wennborg2016-06-231-0/+96
| | | | | | Differential Revision: http://reviews.llvm.org/D21630 llvm-svn: 273579
* [codeview] Write LF_UDT_SRC_LINE records (PR28251)Hans Wennborg2016-06-226-84/+198
| | | | | | Differential Revision: http://reviews.llvm.org/D21621 llvm-svn: 273495
* [codeview] Fix the alignment padding that we add to list recordsReid Kleckner2016-06-221-1/+1
| | | | | | | Tweak the big-types.ll test case to catch this bug. We just need an enumerator name that doesn't have a length that is a multiple of 4. llvm-svn: 273477
* [codeview] Add IntroducingVirtual debug info flagReid Kleckner2016-06-221-0/+294
| | | | | | | | CodeView needs to know if a virtual method was introduced in the current class, and base classes may not have complete type information, so we need to thread this bit through from the frontend. llvm-svn: 273453
* [codeview] Defer emission of all referenced complete recordsReid Kleckner2016-06-223-35/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | This is the motivating example: struct B { int b; }; struct A { B *b; }; int f(A *p) { return p->b->b; } Clang emits complete types for both A and B because they are required to be complete, but our CodeView emission would only emit forward declarations of A and B. This was a consequence of the fact that the A* type must reference the forward declaration of A, which doesn't reference B at all. We can't eagerly emit complete definitions of A and B when we request the forward declaration's type index because of recursive types like linked lists. If we did that, our stack usage could get out of hand, and it would be possible to lower a type while attempting to lower a type, and we would need to double check if our type is already present in the TypeIndexMap after all recursive getTypeIndex calls. Instead, defer complete type emission until after all type lowering has completed. This ensures that all referenced complete types are emitted, and that type lowering is not re-entrant. llvm-svn: 273443
* [codeview] Improve names of types in scopes and member function idsReid Kleckner2016-06-223-6/+149
| | | | | | | | | | | | We now include namespace scope info in LF_FUNC_ID records and we emit LF_MFUNC_ID records for member functions as we should. Class names are now fully qualified, which is what MSVC does. Add a little bit of scaffolding to handle ThisAdjustment when it arrives in DISubprogram. llvm-svn: 273358
* [codeview] Add missing test from r273294Reid Kleckner2016-06-221-0/+5768
| | | | llvm-svn: 273355
* [codeview] Add support for splitting field list records over 64KBReid Kleckner2016-06-214-20/+20
| | | | | | | | | | | | | | | | | The basic structure is that once a list record goes over 64K, the last subrecord of the list is an LF_INDEX record that refers to the next record. Because the type record graph must be toplogically sorted, this means we have to emit them in reverse order. We build the type record in order of declaration, so this means that if we don't want extra copies, we need to detect when we were about to split a record, and leave space for a continuation subrecord that will point to the eventual split top-level record. Also adds dumping support for these records. Next we should make sure that large method overload lists work properly. llvm-svn: 273294
* [codeview] Emit non-virtual method type.Amjad Aboud2016-06-185-71/+353
| | | | | | Differential Revision: http://reviews.llvm.org/D21011 llvm-svn: 273084
* [codeview] Emit incomplete member pointer types with the unknown modelReid Kleckner2016-06-171-28/+80
| | | | | | | An incomplete member pointer type will always have a size of zero, so we don't need an extra flag. Credit to David Majnemer for the idea. llvm-svn: 273057
* [codeview] Add DIFlags for pointer to member representationsReid Kleckner2016-06-172-2/+211
| | | | | | | | | | | | | | | | Summary: This seems like the least intrusive way to pass this information through. Fixes PR28151 Reviewers: majnemer, aprantl, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D21444 llvm-svn: 273053
* [CodeView] Refactor enumerator emissionDavid Majnemer2016-06-171-1/+1
| | | | | | This addresses Amjad's review comments on D21442. llvm-svn: 273010
* [codeview] Make function names more consistent with MSVCReid Kleckner2016-06-171-39/+67
| | | | | | | | | | | | | | | Names in function id records don't include nested name specifiers or template arguments, but names in the symbol stream include both. For the symbol stream, instead of having Clang put the fully qualified name in the subprogram display name, recreate it from the subprogram scope chain. For the type stream, take the unqualified name and chop of any template arguments. This makes it so that CodeView DI metadata is more similar to DWARF DI metadata. llvm-svn: 273009
* [CodeView] Implement support for enumsDavid Majnemer2016-06-161-0/+47
| | | | | | | | | | MSVC handles enums differently from structs and classes: a forward declaration is not emitted unconditionally. MSVC does not emit an S_UDT record for the enum. Differential Revision: http://reviews.llvm.org/D21442 llvm-svn: 272960
* [codeview] Regenerate test case with unique identifiersReid Kleckner2016-06-161-41/+59
| | | | | | | Clang now emits these, and these match MSVC. Should allow more powerful merging of type records across TUs. llvm-svn: 272864
* [CodeView] Add support for emitting S_UDT for typedefsDavid Majnemer2016-06-152-0/+65
| | | | | | | | | Emit a S_UDT record for typedefs. We still need to do something for class types. Differential Revision: http://reviews.llvm.org/D21149 llvm-svn: 272813
* [CodeView] Don't emit debuginfo for imported symbolsDavid Majnemer2016-06-151-0/+29
| | | | | | | | | Emitting symbol information requires us to have a definition for the symbol. A symbol reference is insufficient. This fixes PR28123. llvm-svn: 272738
* [codeview] Skip DIGlobalVariables with no variableReid Kleckner2016-06-091-0/+35
| | | | | | They have probably been discarded during optimization. llvm-svn: 272231
* [DebugInfo] Add calling convention support for DWARF and CodeViewReid Kleckner2016-06-081-0/+212
| | | | | | | | | | | | | | | | | | | | | Summary: Now DISubroutineType has a 'cc' field which should be a DW_CC_ enum. If it is present and non-zero, the backend will emit it as a DW_AT_calling_convention attribute. On the CodeView side, we translate it to the appropriate enum for the LF_PROCEDURE record. I added a new LLVM vendor specific enum to the list of DWARF calling conventions. DWARF does not appear to attempt to standardize these, so I assume it's OK to do this until we coordinate with GCC on how to emit vectorcall convention functions. Reviewers: dexonsmith, majnemer, aaboud, amccarth Subscribers: mehdi_amini, llvm-commits Differential Revision: http://reviews.llvm.org/D21114 llvm-svn: 272197
* Generate codeview for array type metadata.Adrian McCarthy2016-06-081-0/+142
| | | | | | Differential Revision: http://reviews.llvm.org/D21107 llvm-svn: 272187
* Re-land "[codeview] Emit information about global variables"Reid Kleckner2016-06-071-0/+146
| | | | | | | | | | | | This reverts commit r271962 and reinstantes r271957. MSVC's linker doesn't appear to like it if you have an empty symbol substream, so only open a symbol substream if we're going to emit something about globals into it. Makes check-asan pass. llvm-svn: 271965
* Revert "[codeview] Emit information about global variables"Reid Kleckner2016-06-064-163/+12
| | | | | | This reverts commit r271957, it broke check-asan on Windows. llvm-svn: 271962
* [codeview] Emit information about global variablesReid Kleckner2016-06-064-12/+163
| | | | | | | This currently emits everything as S_GDATA32, which isn't right for things like thread locals, but it's a start. llvm-svn: 271957
* [codeview] Add basic record type translationReid Kleckner2016-06-033-15/+708
| | | | | | | | | | | This only translates data members for now. Translating overloaded methods is complicated, so I stopped short of doing that. Reviewers: aaboud Differential Revision: http://reviews.llvm.org/D20924 llvm-svn: 271680
* [codeview] Fix crash when handling qualified void typesReid Kleckner2016-06-021-54/+86
| | | | | | | | | | The DIType* for void is the null pointer. A null DIType can never be a qualified type, so we can just exit the loop at this point and go to getTypeIndex(BaseTy). Fixes PR27984 llvm-svn: 271550
* [CodeView] Implement function-type indicesDavid Majnemer2016-06-026-23/+69
| | | | | | | | | We still need to do something about member functions and calling conventions. Differential Revision: http://reviews.llvm.org/D20900 llvm-svn: 271541
* [CodeView] Use the right type index for long longDavid Majnemer2016-06-021-1/+1
| | | | | | We used T_INT8 instead of T_QUAD. llvm-svn: 271497
* [codeview] Return type indices for typedefsDavid Majnemer2016-06-021-0/+38
| | | | | | | Use the type index of the underlying type unless we have a typedef from long to HRESULT; HRESULT typedefs are translated to T_HRESULT. llvm-svn: 271494
* [codeview] Translate basic DITypes to CV type recordsReid Kleckner2016-06-012-31/+431
| | | | | | | | | | | | | | | Summary: This is meant to be the tiniest step towards DIType to CV type index translation that I could come up with. Whenever translation fails, we use type index zero, which is the unknown type. Reviewers: aaboud, zturner Subscribers: llvm-commits, amccarth Differential Revision: http://reviews.llvm.org/D20840 llvm-svn: 271408
* [codeview] Improve readability of type record assemblyReid Kleckner2016-05-311-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the method MCStreamer::EmitBinaryData, which is usually an alias for EmitBytes. In the MCAsmStreamer case, it is overridden to emit hex dump output like this: .byte 0x0e, 0x00, 0x08, 0x10 .byte 0x03, 0x00, 0x00, 0x00 .byte 0x00, 0x00, 0x00, 0x00 .byte 0x00, 0x10, 0x00, 0x00 Also, when verbose asm comments are enabled, this patch prints the dump output for each comment before its record, like this: # ArgList (0x1000) { # TypeLeafKind: LF_ARGLIST (0x1201) # NumArgs: 0 # Arguments [ # ] # } .byte 0x06, 0x00, 0x01, 0x12 .byte 0x00, 0x00, 0x00, 0x00 This should make debugging easier and testing more convenient. Reviewers: aaboud Subscribers: majnemer, zturner, amccarth, aaboud, llvm-commits Differential Revision: http://reviews.llvm.org/D20711 llvm-svn: 271313
* [codeview] Use comdats for debug info describing comdat functionsReid Kleckner2016-05-255-0/+204
| | | | | | | | | | | | | | | | | | Summary: This allows the linker to discard unused symbol information for comdat functions that were discarded during the link. Before this change, searching for the name of an inline function in the debugger would return multiple results, one per symbol subsection in the object file. After this change, there is only one result, the result for the function chosen by the linker. Reviewers: zturner, majnemer Subscribers: aaboud, amccarth, llvm-commits Differential Revision: http://reviews.llvm.org/D20642 llvm-svn: 270792
* PR26055: Speed up LiveDebugValues by replacing lists with bitvectors.Adrian Prantl2016-05-251-4/+4
| | | | | | | | | | | | | | | | | | | | | This patch modifies the LiveDebugValues pass to use more efficient set data structures as outlined in PR26055. Both VarLocSet and VarLocList are now SparseBitVectors which allows us to perform much faster bitvector arithmetic on them. The speedup can be in the order of minutes especially on ASANified code. The change is not NFC in the assembler output because the inserted DBG_VALUEs are now sorted by variable and location. Many thanks to Daniel Berlin for helping design the improved algorithm and reviewing the patch. https://llvm.org/bugs/show_bug.cgi?id=26055 http://reviews.llvm.org/D20178 rdar://problem/24091200 llvm-svn: 270776
* Dump symbol record details in llvm-pdbdumpZachary Turner2016-05-244-12/+24
| | | | | | | | | | | | | This makes use of the newly introduced `CVSymbolVisitor` to dump details of each type of symbol record in the symbol streams. Future patches will bring this visitor based dumping to the publics stream, as well as creating a `SymbolDumpDelegate` to print more information about relocations etc. Differential Revision: http://reviews.llvm.org/D20545 Reviewed By: ruiu llvm-svn: 270585
* Modify emitTypeInformation to use MemoryTypeTableBuilder, take 2Reid Kleckner2016-05-232-0/+158
| | | | | | | | | | | | | | This effectively revers commit r270389 and re-lands r270106, but it's almost a rewrite. The behavior change in r270106 was that we could no longer assume that each LF_FUNC_ID record got its own type index. This patch adds a map from DINode* to TypeIndex, so we can stop making that assumption. This change also emits padding bytes between type records similar to the way MSVC does. The size of the type record includes the padding bytes. llvm-svn: 270485
* [codeview] Align class and print names of typesReid Kleckner2016-05-131-1/+1
| | | | | | | | | | | | Summary: This way we can get rid of one of the fields in the .def file. Reviewers: llvm-commits Subscribers: zturner Differential Revision: http://reviews.llvm.org/D20251 llvm-svn: 269461
* [codeview] Dump the type index on the first line of each recordReid Kleckner2016-05-131-8/+4
| | | | | | This will make it easier to write FileCheck tests. llvm-svn: 269444
OpenPOWER on IntegriCloud