summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DIBuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [Layering] Move DIBuilder.h into the IR library where its implementationChandler Carruth2014-03-061-1/+1
| | | | | | already lives. llvm-svn: 203038
* Add DWARF discriminator support to DILexicalBlocks.Diego Novillo2014-03-031-1/+3
| | | | | | This adds support for emitting discriminators from DILexicalBlocks. llvm-svn: 202736
* Fix >> to be > > for non-c++11.Eric Christopher2014-02-281-1/+1
| | | | llvm-svn: 202545
* 80-col.Eric Christopher2014-02-281-1/+2
| | | | llvm-svn: 202541
* Fix a crasher where when we're attempting to replace a typeEric Christopher2014-02-281-4/+7
| | | | | | | | | | during the finalization for CGDebugInfo in clang we would RAUW a type and it would result in a corrupted MDNode for an imported declaration. Testcase pending as reducing has been difficult. llvm-svn: 202540
* Add a debug info code generation level to the compile unit metadataEric Christopher2014-02-271-2/+5
| | | | | | | | | | and update everything accordingly. This can be used to conditionalize the amount of output in the backend based on the amount of debug requested/metadata emission scheme by a front end (e.g. clang). Paired with a commit to clang. llvm-svn: 202332
* DIBuilder: simplify array generation to produce true zero-length arraysDavid Blaikie2014-02-031-4/+0
| | | | | | | | | | | | For some anachronistic reason we were producing {i32 0} for zero-length debug info arrays. (this change is paired with a Clang change and may cause temporary buildbot noise) Let's not. llvm-svn: 200721
* Debug info: Implement (rvalue) reference qualifiers for C++11 non-staticAdrian Prantl2013-12-181-2/+3
| | | | | | | | member functions. Paired commit with CFE. rdar://problem/15356637 llvm-svn: 197613
* DebugInfo: Simplify a few more explicit constructions, underconstrained ↵David Blaikie2013-11-181-4/+4
| | | | | | types, and make DIType(MDNode*) explicit like all the other DI* node ctors. llvm-svn: 195055
* Add an assert that we have a scope that matters for methodsEric Christopher2013-10-151-1/+4
| | | | | | | and remove a call to getNonCompileUnitScope as a method shouldn't be in the compile unit scope. llvm-svn: 192748
* Clean up, formatting, comments. No functional change.Eric Christopher2013-10-151-100/+88
| | | | llvm-svn: 192747
* Debug Info: In DIBuilder, the context field of subprogram is updated to useManman Ren2013-10-101-2/+24
| | | | | | | | DIScopeRef. A paired commit at clang is required due to changes to DIBuilder. llvm-svn: 192378
* Debug Info: In DIBuilder, the context and type fields of template_type andManman Ren2013-10-091-4/+4
| | | | | | | | template_value are updated to use DIRef. A paired commit at clang is required due to changes to DIBuilder. llvm-svn: 192320
* Debug Info: In DIBuilder, the context field of a forward decl is updatedManman Ren2013-10-091-1/+1
| | | | | | to use DIScopeRef. llvm-svn: 192309
* Debug Info: In DIBuilder, the context field of a DICompositeType is updatedManman Ren2013-10-091-4/+4
| | | | | | | | to use DIScopeRef. A paired commit at clang is required due to changes to DIBuilder. llvm-svn: 192256
* Debug Info: In DIBuilder, the context fields of a static member and aManman Ren2013-10-081-2/+2
| | | | | | typedef are updated to use DIScopeRef. llvm-svn: 192254
* Debug Info: In DIBuilder, the derived-from field of DICompositeTypeManman Ren2013-10-081-5/+5
| | | | | | | | is updated to use DITypeRef. A paired commit at clang is required due to changes to DIBuilder. llvm-svn: 192251
* Debug Info: In DIBuilder, the derived-from field of DIDerivedTypeManman Ren2013-10-081-8/+8
| | | | | | | | is updated to use DITypeRef. A paired commit at clang is required due to changes to DIBuilder. llvm-svn: 192246
* Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_typeManman Ren2013-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | is updated to use DITypeRef. Move isUnsignedDIType and getOriginalTypeSize from DebugInfo.h to be static helper functions in DwarfCompileUnit. We already have a static helper function "isTypeSigned" in DwarfCompileUnit, and a pointer to DwarfDebug is added to resolve the derived-from field. All three functions need to go across link for derived-from fields, so we need to get hold of a type identifier map. A pointer to DwarfDebug is also added to DbgVariable in order to resolve the derived-from field. Debug info verifier is updated to check a derived-from field is a TypeRef. Verifier will not go across link for derived-from fields, in debug info finder, we go across the link to add derived-from fields to types. Function getDICompositeType is only used by dragonegg and since dragonegg does not generate identifier for types, we use an empty map to resolve the derived-from field. When printing a derived-from field, we use DITypeRef::getName to either return the type identifier or getName of the DIType. A paired commit at clang is required due to changes to DIBuilder. llvm-svn: 192018
* Temporarily revert r191792 as it is causing some LTO debug failuresEric Christopher2013-10-041-1/+1
| | | | | | | on platforms with relocations in debug info and also temporarily revert r191800 due to conflicts with the revert of r191792. llvm-svn: 191967
* Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_typeManman Ren2013-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | is updated to use DITypeRef. Move isUnsignedDIType and getOriginalTypeSize from DebugInfo.h to be static helper functions in DwarfCompileUnit. We already have a static helper function "isTypeSigned" in DwarfCompileUnit, and a pointer to DwarfDebug is added to resolve the derived-from field. All three functions need to go across link for derived-from fields, so we need to get hold of a type identifier map. A pointer to DwarfDebug is also added to DbgVariable in order to resolve the derived-from field. Debug info verifier is updated to check a derived-from field is a TypeRef. Verifier will not go across link for derived-from fields, in debug info finder, we go across the link to add derived-from fields to types. Function getDICompositeType is only used by dragonegg and since dragonegg does not generate identifier for types, we use an empty map to resolve the derived-from field. When printing a derived-from field, we use DITypeRef::getName to either return the type identifier or getName of the DIType. A paired commit at clang is required due to changes to DIBuilder. llvm-svn: 191800
* Debug Info: constify and rename from generateRef to getRef.Manman Ren2013-09-301-7/+7
| | | | | | No functionality change. llvm-svn: 191696
* Debug Info: In DIBuilder, the context fields of a TAG_inheritance and aManman Ren2013-09-091-2/+2
| | | | | | | | TAG_friend are updated to use scope reference. Added testing cases to verify that class with inheritance can be uniqued. llvm-svn: 190364
* Debug Info: Use DIScopeRef for DIType::getContext.Manman Ren2013-09-091-1/+1
| | | | | | | | | | | | | | | | | In DIBuilder, the context field of a TAG_member is updated to use the scope reference. Verifier is updated accordingly. DebugInfoFinder now needs to generate a type identifier map to have access to the actual scope. Same applies for BreakpointPrinter. processModule of DebugInfoFinder is called during initialization phase of the verifier to make sure the type identifier map is constructed early enough. We are now able to unique a simple class as demonstrated by the added testing case. llvm-svn: 190334
* Revert r190269 to fix dragonegg failures.Manman Ren2013-09-081-1/+1
| | | | llvm-svn: 190271
* Debug Info: use null instead of "i32 0" in DIBuilder.Manman Ren2013-09-081-13/+5
| | | | | | For context field of subroutine_type and when creating artificial types. llvm-svn: 190270
* Debug Info: pass in DIScope instead of DIDescriptor in createMemberType.Manman Ren2013-09-081-1/+1
| | | | | | Improve readability. No functionality change. llvm-svn: 190269
* Debug Info: Use identifier to reference DIType in containing type field ofManman Ren2013-09-071-1/+1
| | | | | | | | a DISubprogram. Verifier is updated accordingly. llvm-svn: 190229
* Debug Info: pass in VTableHolder as DIType instead of MDNode *.Manman Ren2013-09-061-5/+5
| | | | | | Remove one cast and improve readability. No functionality change. llvm-svn: 190225
* Debug Info: Use identifier to reference DIType in containing type field ofManman Ren2013-09-061-2/+2
| | | | | | | | a DICompositeType. Verifier is updated accordingly. llvm-svn: 190190
* Debug Info: Move a helper function getTypeIdentifier from DIBuilder to be partManman Ren2013-09-061-13/+1
| | | | | | | | | | | of DIType. Implement DIType::generateRef to return a type reference. This function will be used in setContaintingType and in DIBuilder to generete the type reference. No functionality change. llvm-svn: 190188
* Debug Info: Use identifier to reference DIType in base type field ofManman Ren2013-09-051-1/+13
| | | | | | | | | | | | | | | | | | | | | | ptr_to_member. We introduce a new class DITypeRef that represents a reference to a DIType. It wraps around a Value*, which can be either an identifier in MDString or an actual MDNode. The class has a helper function "resolve" that finds the actual MDNode for a given DITypeRef. We specialize getFieldAs to return a field that is a reference to a DIType. To correctly access the base type field of ptr_to_member, getClassType now calls getFieldAs<DITypeRef> to return a DITypeRef. Also add a typedef for DITypeIdentifierMap and a helper generateDITypeIdentifierMap in DebugInfo.h. In DwarfDebug.cpp, we keep a DITypeIdentifierMap and call generateDITypeIdentifierMap to actually populate the map. Verifier is updated accordingly. llvm-svn: 190081
* DIBuilder: retain a type when created with a unique identifier.Manman Ren2013-08-291-3/+23
| | | | | | | | | | | | | | | createClassType, createStructType, createUnionType, createEnumerationType, and createForwardDecl will retain a type when created with a unique identifier, to make sure they are treated as used even when all uses are replaced with the identifiers. Use TrackingVH<MDNode> instead of MDNode in AllRetainTypes, since the created node can later be updated. The change will be tested when clients of DIBuilder start to pass in non-empty unique identifier. llvm-svn: 189621
* DIBuilder: take an optional StringRef to pass in unique identifier.Manman Ren2013-08-271-10/+14
| | | | | | | | createClassType, createStructType, createUnionType, createEnumerationType, and createForwardDecl will take an optional StringRef to pass in the unique identifier. llvm-svn: 189410
* Debug Info: add an identifier field to DICompositeType.Manman Ren2013-08-261-8/+21
| | | | | | | | | | | | | | | | | | DICompositeType will have an identifier field at position 14. For now, the field is set to null in DIBuilder. For DICompositeTypes where the template argument field (the 13th field) was optional, modify DIBuilder to make sure the template argument field is set. Now DICompositeType has 15 fields. Update DIBuilder to use NULL instead of "i32 0" for null value of a MDNode. Update verifier to check that DICompositeType has 15 fields and the last field is null or a MDString. Update testing cases to include an extra field for DICompositeType. The identifier field will be used by type uniquing so a front end can genearte a DICompositeType with a unique identifer. llvm-svn: 189282
* DebugInfo: Allow the addition of other (such as static data) members to a ↵David Blaikie2013-08-161-4/+5
| | | | | | | | record type after construction Plus a type cleanup & minor fix to enumerate members of declarations. llvm-svn: 188577
* Make sure that if we're going to attempt to add a type to a DIE thatEric Christopher2013-08-081-1/+0
| | | | | | | | | | | | the type exists. Fix up cases where we weren't checking for optional types and add an assert to addType to make sure we catch this in the future. Fix up a testcase that was using the tag for DW_TAG_array_type when it meant DW_TAG_enumeration_type. llvm-svn: 187963
* Remove DIBuilder cache of variable TheCU and change the fewEric Christopher2013-07-191-14/+18
| | | | | | | uses that wanted it. Also change the interface for createCompileUnit to compensate. Fix comments that refer to TheCU as well. llvm-svn: 186637
* Revert "Remove DIBuilder cache of variable TheCU and change the few"Eric Christopher2013-07-181-18/+14
| | | | | | This reverts commit r186599 as I didn't want to commit this yet. llvm-svn: 186601
* Remove DIBuilder cache of variable TheCU and change the fewEric Christopher2013-07-181-14/+18
| | | | | | | uses that wanted it. Also change the interface for createCompileUnit to compensate. Fix comments that refer to TheCU as well. llvm-svn: 186599
* Debug Info: cleanupManman Ren2013-07-021-4/+6
| | | | llvm-svn: 185456
* Debug Info: clean up usage of Verify.Manman Ren2013-07-011-16/+18
| | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. llvm-svn: 185383
* Debug Info: clean up usage of Verify.Manman Ren2013-06-291-4/+8
| | | | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. For cases where we know the type of a DI metadata, use assert. llvm-svn: 185249
* Rename DIBuilder::createNullPtrType to createUnspecifiedType and introducePeter Collingbourne2013-06-271-4/+9
| | | | | | | | | a zero-argument createNullPtrType function for creating the canonical nullptr type. Differential Revision: http://llvm-reviews.chandlerc.com/D1050 llvm-svn: 185114
* s/C++0x/C++11/Adrian Prantl2013-06-251-1/+1
| | | | llvm-svn: 184892
* typo.Adrian Prantl2013-06-241-1/+1
| | | | llvm-svn: 184783
* DebugInfo: DIBuilder changes to match DIEnumerator changes in r184694David Blaikie2013-06-241-1/+1
| | | | | | | | Representing enumerators by int64 instead of uint64 for now. At some point we need to address the underlying issue of representation depending on the specific enumeration. llvm-svn: 184761
* DebugInfo: Support (using GNU extensions) for template template parameters ↵David Blaikie2013-06-221-6/+37
| | | | | | and parameter packs llvm-svn: 184643
* DIBuilder: No functionality change.Manman Ren2013-06-071-23/+26
| | | | | | Use the correct DIType when creating types in DIBuilder. llvm-svn: 183543
* DIBuilder: No functionality change.Manman Ren2013-06-071-3/+3
| | | | | | Use the correct DIType when creating vector types. llvm-svn: 183484
OpenPOWER on IntegriCloud