LLVM API Documentation

Public Types | Public Member Functions
llvm::DIBuilder Class Reference

#include <DIBuilder.h>

List of all members.

Public Types

enum  ComplexAddrKind { OpPlus = 1, OpDeref, OpPiece }
enum  DebugEmissionKind { FullDebug = 1, LineTablesOnly }

Public Member Functions

 DIBuilder (Module &M)
void finalize ()
 finalize - Construct any deferred debug info descriptors.
DICompileUnit createCompileUnit (unsigned Lang, StringRef File, StringRef Dir, StringRef Producer, bool isOptimized, StringRef Flags, unsigned RV, StringRef SplitName=StringRef(), DebugEmissionKind Kind=FullDebug, bool EmitDebugInfo=true)
DIFile createFile (StringRef Filename, StringRef Directory)
DIEnumerator createEnumerator (StringRef Name, int64_t Val)
 createEnumerator - Create a single enumerator value.
DIBasicType createUnspecifiedType (StringRef Name)
 Create a DWARF unspecified type.
DIBasicType createNullPtrType ()
 Create C++11 nullptr type.
DIBasicType createBasicType (StringRef Name, uint64_t SizeInBits, uint64_t AlignInBits, unsigned Encoding)
DIDerivedType createQualifiedType (unsigned Tag, DIType FromTy)
DIDerivedType createPointerType (DIType PointeeTy, uint64_t SizeInBits, uint64_t AlignInBits=0, StringRef Name=StringRef())
 createPointerType - Create debugging information entry for a pointer.
DIDerivedType createMemberPointerType (DIType PointeeTy, DIType Class)
 Create debugging information entry for a pointer to member.
DIDerivedType createReferenceType (unsigned Tag, DIType RTy)
DIDerivedType createTypedef (DIType Ty, StringRef Name, DIFile File, unsigned LineNo, DIDescriptor Context)
 createTypedef - Create debugging information entry for a typedef.
DIDerivedType createFriend (DIType Ty, DIType FriendTy)
 createFriend - Create debugging information entry for a 'friend'.
DIDerivedType createInheritance (DIType Ty, DIType BaseTy, uint64_t BaseOffset, unsigned Flags)
DIDerivedType createMemberType (DIDescriptor Scope, StringRef Name, DIFile File, unsigned LineNo, uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags, DIType Ty)
 createMemberType - Create debugging information entry for a member.
DIDerivedType createStaticMemberType (DIDescriptor Scope, StringRef Name, DIFile File, unsigned LineNo, DIType Ty, unsigned Flags, llvm::Value *Val)
DIDerivedType createObjCIVar (StringRef Name, DIFile File, unsigned LineNo, uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags, DIType Ty, StringRef PropertyName=StringRef(), StringRef PropertyGetterName=StringRef(), StringRef PropertySetterName=StringRef(), unsigned PropertyAttributes=0)
DIDerivedType createObjCIVar (StringRef Name, DIFile File, unsigned LineNo, uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags, DIType Ty, MDNode *PropertyNode)
DIObjCProperty createObjCProperty (StringRef Name, DIFile File, unsigned LineNumber, StringRef GetterName, StringRef SetterName, unsigned PropertyAttributes, DIType Ty)
DICompositeType createClassType (DIDescriptor Scope, StringRef Name, DIFile File, unsigned LineNumber, uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags, DIType DerivedFrom, DIArray Elements, DIType VTableHolder=DIType(), MDNode *TemplateParms=nullptr, StringRef UniqueIdentifier=StringRef())
 createClassType - Create debugging information entry for a class.
DICompositeType createStructType (DIDescriptor Scope, StringRef Name, DIFile File, unsigned LineNumber, uint64_t SizeInBits, uint64_t AlignInBits, unsigned Flags, DIType DerivedFrom, DIArray Elements, unsigned RunTimeLang=0, DIType VTableHolder=DIType(), StringRef UniqueIdentifier=StringRef())
 createStructType - Create debugging information entry for a struct.
DICompositeType createUnionType (DIDescriptor Scope, StringRef Name, DIFile File, unsigned LineNumber, uint64_t SizeInBits, uint64_t AlignInBits, unsigned Flags, DIArray Elements, unsigned RunTimeLang=0, StringRef UniqueIdentifier=StringRef())
 createUnionType - Create debugging information entry for an union.
DITemplateTypeParameter createTemplateTypeParameter (DIDescriptor Scope, StringRef Name, DIType Ty, MDNode *File=nullptr, unsigned LineNo=0, unsigned ColumnNo=0)
DITemplateValueParameter createTemplateValueParameter (DIDescriptor Scope, StringRef Name, DIType Ty, Value *Val, MDNode *File=nullptr, unsigned LineNo=0, unsigned ColumnNo=0)
DITemplateValueParameter createTemplateTemplateParameter (DIDescriptor Scope, StringRef Name, DIType Ty, StringRef Val, MDNode *File=nullptr, unsigned LineNo=0, unsigned ColumnNo=0)
 Create debugging information for a template template parameter.
DITemplateValueParameter createTemplateParameterPack (DIDescriptor Scope, StringRef Name, DIType Ty, DIArray Val, MDNode *File=nullptr, unsigned LineNo=0, unsigned ColumnNo=0)
 Create debugging information for a template parameter pack.
DICompositeType createArrayType (uint64_t Size, uint64_t AlignInBits, DIType Ty, DIArray Subscripts)
 createArrayType - Create debugging information entry for an array.
DICompositeType createVectorType (uint64_t Size, uint64_t AlignInBits, DIType Ty, DIArray Subscripts)
 createVectorType - Create debugging information entry for a vector.
DICompositeType createEnumerationType (DIDescriptor Scope, StringRef Name, DIFile File, unsigned LineNumber, uint64_t SizeInBits, uint64_t AlignInBits, DIArray Elements, DIType UnderlyingType, StringRef UniqueIdentifier=StringRef())
DISubroutineType createSubroutineType (DIFile File, DITypeArray ParameterTypes, unsigned Flags=0)
 createSubroutineType - Create subroutine type.
DIType createArtificialType (DIType Ty)
 createArtificialType - Create a new DIType with "artificial" flag set.
DIType createObjectPointerType (DIType Ty)
DICompositeType createForwardDecl (unsigned Tag, StringRef Name, DIDescriptor Scope, DIFile F, unsigned Line, unsigned RuntimeLang=0, uint64_t SizeInBits=0, uint64_t AlignInBits=0, StringRef UniqueIdentifier=StringRef())
 Create a permanent forward-declared type.
DICompositeType createReplaceableForwardDecl (unsigned Tag, StringRef Name, DIDescriptor Scope, DIFile F, unsigned Line, unsigned RuntimeLang=0, uint64_t SizeInBits=0, uint64_t AlignInBits=0, StringRef UniqueIdentifier=StringRef())
 Create a temporary forward-declared type.
void retainType (DIType T)
DIBasicType createUnspecifiedParameter ()
DIArray getOrCreateArray (ArrayRef< Value * > Elements)
 getOrCreateArray - Get a DIArray, create one if required.
DITypeArray getOrCreateTypeArray (ArrayRef< Value * > Elements)
 getOrCreateTypeArray - Get a DITypeArray, create one if required.
DISubrange getOrCreateSubrange (int64_t Lo, int64_t Count)
DIGlobalVariable createGlobalVariable (StringRef Name, DIFile File, unsigned LineNo, DITypeRef Ty, bool isLocalToUnit, llvm::Value *Val)
 Create a new descriptor for the specified global.
DIGlobalVariable createGlobalVariable (StringRef Name, StringRef LinkageName, DIFile File, unsigned LineNo, DITypeRef Ty, bool isLocalToUnit, llvm::Value *Val)
 Create a new descriptor for the specified global.
DIGlobalVariable createStaticVariable (DIDescriptor Context, StringRef Name, StringRef LinkageName, DIFile File, unsigned LineNo, DITypeRef Ty, bool isLocalToUnit, llvm::Value *Val, MDNode *Decl=nullptr)
DIGlobalVariable createTempStaticVariableFwdDecl (DIDescriptor Context, StringRef Name, StringRef LinkageName, DIFile File, unsigned LineNo, DITypeRef Ty, bool isLocalToUnit, llvm::Value *Val, MDNode *Decl=nullptr)
DIVariable createLocalVariable (unsigned Tag, DIDescriptor Scope, StringRef Name, DIFile File, unsigned LineNo, DITypeRef Ty, bool AlwaysPreserve=false, unsigned Flags=0, unsigned ArgNo=0)
 createVariable - Create a new descriptor for the specified variable.
DIVariable createComplexVariable (unsigned Tag, DIDescriptor Scope, StringRef Name, DIFile F, unsigned LineNo, DITypeRef Ty, ArrayRef< Value * > Addr, unsigned ArgNo=0)
DIVariable createVariablePiece (DIVariable Variable, unsigned OffsetInBytes, unsigned SizeInBytes)
DISubprogram createFunction (DIDescriptor Scope, StringRef Name, StringRef LinkageName, DIFile File, unsigned LineNo, DICompositeType Ty, bool isLocalToUnit, bool isDefinition, unsigned ScopeLine, unsigned Flags=0, bool isOptimized=false, Function *Fn=nullptr, MDNode *TParam=nullptr, MDNode *Decl=nullptr)
 createFunction - Create a new descriptor for the specified function.
DISubprogram createTempFunctionFwdDecl (DIDescriptor Scope, StringRef Name, StringRef LinkageName, DIFile File, unsigned LineNo, DICompositeType Ty, bool isLocalToUnit, bool isDefinition, unsigned ScopeLine, unsigned Flags=0, bool isOptimized=false, Function *Fn=nullptr, MDNode *TParam=nullptr, MDNode *Decl=nullptr)
DISubprogram createFunction (DIScopeRef Scope, StringRef Name, StringRef LinkageName, DIFile File, unsigned LineNo, DICompositeType Ty, bool isLocalToUnit, bool isDefinition, unsigned ScopeLine, unsigned Flags=0, bool isOptimized=false, Function *Fn=nullptr, MDNode *TParam=nullptr, MDNode *Decl=nullptr)
DISubprogram createMethod (DIDescriptor Scope, StringRef Name, StringRef LinkageName, DIFile File, unsigned LineNo, DICompositeType Ty, bool isLocalToUnit, bool isDefinition, unsigned Virtuality=0, unsigned VTableIndex=0, DIType VTableHolder=DIType(), unsigned Flags=0, bool isOptimized=false, Function *Fn=nullptr, MDNode *TParam=nullptr)
 createMethod - Create a new descriptor for the specified C++ method.
DINameSpace createNameSpace (DIDescriptor Scope, StringRef Name, DIFile File, unsigned LineNo)
DILexicalBlockFile createLexicalBlockFile (DIDescriptor Scope, DIFile File, unsigned Discriminator=0)
DILexicalBlock createLexicalBlock (DIDescriptor Scope, DIFile File, unsigned Line, unsigned Col)
DIImportedEntity createImportedModule (DIScope Context, DINameSpace NS, unsigned Line)
 Create a descriptor for an imported module.
DIImportedEntity createImportedModule (DIScope Context, DIImportedEntity NS, unsigned Line)
 Create a descriptor for an imported module.
DIImportedEntity createImportedDeclaration (DIScope Context, DIScope Decl, unsigned Line, StringRef Name=StringRef())
 Create a descriptor for an imported function.
DIImportedEntity createImportedDeclaration (DIScope Context, DIImportedEntity NS, unsigned Line, StringRef Name=StringRef())
InstructioninsertDeclare (llvm::Value *Storage, DIVariable VarInfo, BasicBlock *InsertAtEnd)
 insertDeclare - Insert a new llvm.dbg.declare intrinsic call.
InstructioninsertDeclare (llvm::Value *Storage, DIVariable VarInfo, Instruction *InsertBefore)
 insertDeclare - Insert a new llvm.dbg.declare intrinsic call.
InstructioninsertDbgValueIntrinsic (llvm::Value *Val, uint64_t Offset, DIVariable VarInfo, BasicBlock *InsertAtEnd)
 insertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call.
InstructioninsertDbgValueIntrinsic (llvm::Value *Val, uint64_t Offset, DIVariable VarInfo, Instruction *InsertBefore)
 insertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call.

Detailed Description

Definition at line 54 of file DIBuilder.h.


Member Enumeration Documentation

Enumerator:
OpPlus 
OpDeref 
OpPiece 

Definition at line 88 of file DIBuilder.h.

Enumerator:
FullDebug 
LineTablesOnly 

Definition at line 89 of file DIBuilder.h.


Constructor & Destructor Documentation

DIBuilder::DIBuilder ( Module M) [explicit]

Definition at line 32 of file DIBuilder.cpp.


Member Function Documentation

DICompositeType DIBuilder::createArrayType ( uint64_t  Size,
uint64_t  AlignInBits,
DIType  Ty,
DIArray  Subscripts 
)

createArrayType - Create debugging information entry for an array.

createArrayType - Create debugging information entry for an array.

Parameters:
SizeArray size.
AlignInBitsAlignment.
TyElement type.
SubscriptsSubscripts.

Definition at line 780 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_array_type, llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::DIScope::getRef(), and GetTagConstant().

DIBasicType DIBuilder::createBasicType ( StringRef  Name,
uint64_t  SizeInBits,
uint64_t  AlignInBits,
unsigned  Encoding 
)

createBasicType - Create debugging information entry for a basic type.

Parameters:
NameType name.
SizeInBitsSize of the type.
AlignInBitsType alignment.
EncodingDWARF encoding code, e.g. dwarf::DW_ATE_float.

createBasicType - Create debugging information entry for a basic type, e.g 'char'.

Definition at line 263 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_base_type, llvm::StringRef::empty(), llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), and GetTagConstant().

DICompositeType DIBuilder::createClassType ( DIDescriptor  Scope,
StringRef  Name,
DIFile  File,
unsigned  LineNumber,
uint64_t  SizeInBits,
uint64_t  AlignInBits,
uint64_t  OffsetInBits,
unsigned  Flags,
DIType  DerivedFrom,
DIArray  Elements,
DIType  VTableHolder = DIType(),
MDNode TemplateParms = nullptr,
StringRef  UniqueIdentifier = StringRef() 
)

createClassType - Create debugging information entry for a class.

createClassType - Create debugging information entry for a class.

Parameters:
ScopeScope in which this class is defined.
Nameclass name.
FileFile where this member is defined.
LineNumberLine number.
SizeInBitsMember size.
AlignInBitsMember alignment.
OffsetInBitsMember offset.
FlagsFlags to encode member attribute, e.g. private
Elementsclass members.
VTableHolderDebug info of the base class that contains vtable for this type. This is used in DW_AT_containing_type. See DWARF documentation for more info.
TemplateParmsTemplate type parameters.
UniqueIdentifierA unique identifier for the class.

Definition at line 612 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_class_type, llvm::StringRef::empty(), llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::DIFile::getFileNode(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), getNonCompileUnitScope(), llvm::DIScope::getRef(), GetTagConstant(), llvm::DIDescriptor::isCompositeType(), llvm::DIDescriptor::isScope(), llvm::DIDescriptor::isType(), and retainType().

DICompileUnit DIBuilder::createCompileUnit ( unsigned  Lang,
StringRef  Filename,
StringRef  Directory,
StringRef  Producer,
bool  isOptimized,
StringRef  Flags,
unsigned  RunTimeVer,
StringRef  SplitName = StringRef(),
DebugEmissionKind  Kind = FullDebug,
bool  EmitDebugInfo = true 
)

createCompileUnit - A CompileUnit provides an anchor for all debugging information generated during this instance of compilation.

Parameters:
LangSource programming language, eg. dwarf::DW_LANG_C99
FileFile name
DirDirectory
ProducerIdentify the producer of debugging information and code. Usually this is a compiler version string.
isOptimizedA boolean flag which indicates whether optimization is ON or not.
FlagsThis string lists command line options. This string is directly embedded in debug info output which may be used by a tool analyzing generated debugging information.
RVThis indicates runtime version for languages like Objective-C.
SplitNameThe name of the file that we'll split debug info out into.
KindThe kind of debug information to generate.
EmitDebugInfoA boolean flag which indicates whether debug information should be written to the final output or not. When this is false, debug information annotations will be present in the IL but they are not written to the final assembly or object file. This supports tracking source location information in the back end without actually changing the output (e.g., when using optimization remarks).

createCompileUnit - A CompileUnit provides an anchor for all debugging information generated during this instance of compilation.

Definition at line 100 of file DIBuilder.cpp.

References llvm::NamedMDNode::addOperand(), createFilePathPair(), llvm::dwarf::DW_LANG_C89, llvm::dwarf::DW_LANG_lo_user, llvm::dwarf::DW_TAG_base_type, llvm::dwarf::DW_TAG_compile_unit, llvm::StringRef::empty(), llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt1Ty(), llvm::Type::getInt32Ty(), llvm::Module::getOrInsertNamedMetadata(), GetTagConstant(), and llvm::MDNode::getTemporary().

DIVariable DIBuilder::createComplexVariable ( unsigned  Tag,
DIDescriptor  Scope,
StringRef  Name,
DIFile  F,
unsigned  LineNo,
DITypeRef  Ty,
ArrayRef< Value * >  Addr,
unsigned  ArgNo = 0 
)

createComplexVariable - Create a new descriptor for the specified variable which has a complex address expression for its address.

Parameters:
TagDwarf TAG. Usually DW_TAG_auto_variable or DW_TAG_arg_variable.
ScopeVariable scope.
NameVariable name.
FFile where this variable is defined.
LineNoLine number.
TyVariable Type
AddrAn array of complex address operations.
ArgNoIf this variable is an argument then this argument's number. 1 indicates 1st argument.

createComplexVariable - Create a new descriptor for the specified variable which has a complex address expression for its address.

Definition at line 1111 of file DIBuilder.cpp.

References F(), llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), getNonCompileUnitScope(), llvm::Constant::getNullValue(), GetTagConstant(), and llvm::ArrayRef< T >::size().

Referenced by llvm::replaceDbgDeclareForAlloca().

DICompositeType DIBuilder::createEnumerationType ( DIDescriptor  Scope,
StringRef  Name,
DIFile  File,
unsigned  LineNumber,
uint64_t  SizeInBits,
uint64_t  AlignInBits,
DIArray  Elements,
DIType  UnderlyingType,
StringRef  UniqueIdentifier = StringRef() 
)

createEnumerationType - Create debugging information entry for an enumeration.

Parameters:
ScopeScope in which this enumeration is defined.
NameUnion name.
FileFile where this member is defined.
LineNumberLine number.
SizeInBitsMember size.
AlignInBitsMember alignment.
ElementsEnumeration elements.
UnderlyingTypeUnderlying type of a C++11/ObjC fixed enum.
UniqueIdentifierA unique identifier for the enum.

createEnumerationType - Create debugging information entry for an enumeration.

Definition at line 749 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_enumeration_type, llvm::StringRef::empty(), llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::DIFile::getFileNode(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), getNonCompileUnitScope(), llvm::DIScope::getRef(), GetTagConstant(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and retainType().

DIEnumerator DIBuilder::createEnumerator ( StringRef  Name,
int64_t  Val 
)
DIFile DIBuilder::createFile ( StringRef  Filename,
StringRef  Directory 
)

createFile - Create a file descriptor to hold debugging information for a file.

Definition at line 216 of file DIBuilder.cpp.

References createFilePathPair(), llvm::dwarf::DW_TAG_file_type, llvm::MDNode::get(), and GetTagConstant().

DICompositeType DIBuilder::createForwardDecl ( unsigned  Tag,
StringRef  Name,
DIDescriptor  Scope,
DIFile  F,
unsigned  Line,
unsigned  RuntimeLang = 0,
uint64_t  SizeInBits = 0,
uint64_t  AlignInBits = 0,
StringRef  UniqueIdentifier = StringRef() 
)
DISubprogram DIBuilder::createFunction ( DIDescriptor  Scope,
StringRef  Name,
StringRef  LinkageName,
DIFile  File,
unsigned  LineNo,
DICompositeType  Ty,
bool  isLocalToUnit,
bool  isDefinition,
unsigned  ScopeLine,
unsigned  Flags = 0,
bool  isOptimized = false,
Function Fn = nullptr,
MDNode TParam = nullptr,
MDNode Decl = nullptr 
)

createFunction - Create a new descriptor for the specified function.

createFunction - Create a new descriptor for the specified subprogram. See comments in DISubprogram for descriptions of these fields.

Parameters:
ScopeFunction scope.
NameFunction name.
LinkageNameMangled function name.
FileFile where this variable is defined.
LineNoLine number.
TyFunction type.
isLocalToUnitTrue if this function is not externally visible.
isDefinitionTrue if this is a function definition.
ScopeLineSet to the beginning of the scope this starts
Flagse.g. is this function prototyped or not. These flags are used to emit dwarf attributes.
isOptimizedTrue if optimization is ON.
Fnllvm::Function pointer.
TParamFunction template parameters.

Definition at line 1214 of file DIBuilder.cpp.

References createFunctionHelper(), llvm::MDNode::get(), Node, and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().

Referenced by createFunction().

DISubprogram DIBuilder::createFunction ( DIScopeRef  Context,
StringRef  Name,
StringRef  LinkageName,
DIFile  File,
unsigned  LineNo,
DICompositeType  Ty,
bool  isLocalToUnit,
bool  isDefinition,
unsigned  ScopeLine,
unsigned  Flags = 0,
bool  isOptimized = false,
Function Fn = nullptr,
MDNode TParams = nullptr,
MDNode Decl = nullptr 
)

FIXME: this is added for dragonegg. Once we update dragonegg to call resolve function, this will be removed.

createFunction - Create a new descriptor for the specified function. FIXME: this is added for dragonegg. Once we update dragonegg to call resolve function, this will be removed.

Definition at line 1158 of file DIBuilder.cpp.

References createFunction(), llvm::ARMBuildAttrs::File, Name, and llvm::DIRef< T >::resolve().

DIGlobalVariable DIBuilder::createGlobalVariable ( StringRef  Name,
DIFile  File,
unsigned  LineNo,
DITypeRef  Ty,
bool  isLocalToUnit,
llvm::Value Val 
)

Create a new descriptor for the specified global.

createGlobalVariable - Create a new descriptor for the specified global.

Parameters:
NameName of the variable.
FileFile where this variable is defined.
LineNoLine number.
TyVariable Type.
isLocalToUnitBoolean flag indicate whether this variable is externally visible or not.
Valllvm::Value of the variable.

Definition at line 1006 of file DIBuilder.cpp.

DIGlobalVariable DIBuilder::createGlobalVariable ( StringRef  Name,
StringRef  LinkageName,
DIFile  File,
unsigned  LineNo,
DITypeRef  Ty,
bool  isLocalToUnit,
llvm::Value Val 
)

Create a new descriptor for the specified global.

Parameters:
NameName of the variable.
LinkageNameMangled variable name.
FileFile where this variable is defined.
LineNoLine number.
TyVariable Type.
isLocalToUnitBoolean flag indicate whether this variable is externally visible or not.
Valllvm::Value of the variable.

Definition at line 980 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_variable, F(), llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), llvm::Constant::getNullValue(), GetTagConstant(), Node, and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().

Create a descriptor for an imported function.

Parameters:
ContextThe scope this module is imported into
DeclThe declaration (or definition) of a function, type, or variable
LineLine number

Definition at line 199 of file DIBuilder.cpp.

References createImportedModule(), llvm::dwarf::DW_TAG_imported_declaration, llvm::DIScope::getRef(), and Name.

Create a descriptor for an imported module.

Parameters:
ContextThe scope this module is imported into
NSThe namespace being imported here
LineLine number

Definition at line 185 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_imported_module.

Referenced by createImportedDeclaration(), and createImportedModule().

Create a descriptor for an imported module.

Parameters:
ContextThe scope this module is imported into
NSAn aliased namespace
LineLine number

Definition at line 192 of file DIBuilder.cpp.

References createImportedModule(), and llvm::dwarf::DW_TAG_imported_module.

DIDerivedType DIBuilder::createInheritance ( DIType  Ty,
DIType  BaseTy,
uint64_t  BaseOffset,
unsigned  Flags 
)

createInheritance - Create debugging information entry to establish inheritance relationship between two types.

Parameters:
TyOriginal type.
BaseTyBase type. Ty is inherits from base.
BaseOffsetBase offset.
FlagsFlags to describe inheritance attribute, e.g. private

createInheritance - Create debugging information entry to establish inheritance relationship between two types.

Definition at line 402 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_inheritance, llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::DIScope::getRef(), GetTagConstant(), and llvm::DIDescriptor::isType().

createLexicalBlock - This creates a descriptor for a lexical block with the specified parent context.

Parameters:
ScopeParent lexical scope.
FileSource file.
LineLine number.
ColColumn number.

Definition at line 1332 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_lexical_block, llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::DIFile::getFileNode(), llvm::Type::getInt32Ty(), getNonCompileUnitScope(), GetTagConstant(), and llvm::DILexicalBlock::Verify().

createLexicalBlockFile - This creates a descriptor for a lexical block with a new file attached. This merely extends the existing lexical block as it crosses a file.

Parameters:
ScopeLexical block.
FileSource file.
DiscriminatorDWARF path discriminator value.

createLexicalBlockFile - This creates a new MDNode that encapsulates an existing scope with a new filename.

Definition at line 1316 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_lexical_block, llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::DIFile::getFileNode(), llvm::Type::getInt32Ty(), GetTagConstant(), and llvm::DILexicalBlockFile::Verify().

DIVariable DIBuilder::createLocalVariable ( unsigned  Tag,
DIDescriptor  Scope,
StringRef  Name,
DIFile  File,
unsigned  LineNo,
DITypeRef  Ty,
bool  AlwaysPreserve = false,
unsigned  Flags = 0,
unsigned  ArgNo = 0 
)

createVariable - Create a new descriptor for the specified variable.

createLocalVariable - Create a new descriptor for the specified local variable.

Parameters:
TagDwarf TAG. Usually DW_TAG_auto_variable or DW_TAG_arg_variable.
ScopeVariable scope.
NameVariable name.
FileFile where this variable is defined.
LineNoLine number.
TyVariable Type
AlwaysPreserveBoolean. Set to true if debug info for this variable should be preserved in optimized build.
FlagsFlags, e.g. artificial variable.
ArgNoIf this variable is an argument then this argument's number. 1 indicates 1st argument.

Definition at line 1076 of file DIBuilder.cpp.

References llvm::NamedMDNode::addOperand(), llvm::ARMBuildAttrs::File, llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::getDISubprogram(), llvm::Type::getInt32Ty(), getNonCompileUnitScope(), llvm::Constant::getNullValue(), llvm::getOrInsertFnSpecificMDNode(), GetTagConstant(), llvm::DIDescriptor::isScope(), llvm::DIDescriptor::isVariable(), and Node.

Create debugging information entry for a pointer to member.

Parameters:
PointeeTyType pointed to by this pointer.
ClassType for which this pointer points to members of.

Definition at line 322 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_ptr_to_member_type, llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::DIScope::getRef(), and GetTagConstant().

DIDerivedType DIBuilder::createMemberType ( DIDescriptor  Scope,
StringRef  Name,
DIFile  File,
unsigned  LineNo,
uint64_t  SizeInBits,
uint64_t  AlignInBits,
uint64_t  OffsetInBits,
unsigned  Flags,
DIType  Ty 
)

createMemberType - Create debugging information entry for a member.

createMemberType - Create debugging information entry for a member.

Parameters:
ScopeMember scope.
NameMember name.
FileFile where this member is defined.
LineNoLine number.
SizeInBitsMember size.
AlignInBitsMember alignment.
OffsetInBitsMember offset.
FlagsFlags to encode member attribute, e.g. private
TyParent type.

Definition at line 423 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_member, llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::DIFile::getFileNode(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), getNonCompileUnitScope(), llvm::DIScope::getRef(), and GetTagConstant().

DISubprogram DIBuilder::createMethod ( DIDescriptor  Scope,
StringRef  Name,
StringRef  LinkageName,
DIFile  File,
unsigned  LineNo,
DICompositeType  Ty,
bool  isLocalToUnit,
bool  isDefinition,
unsigned  Virtuality = 0,
unsigned  VTableIndex = 0,
DIType  VTableHolder = DIType(),
unsigned  Flags = 0,
bool  isOptimized = false,
Function Fn = nullptr,
MDNode TParam = nullptr 
)

createMethod - Create a new descriptor for the specified C++ method.

createMethod - Create a new descriptor for the specified C++ method. See comments in DISubprogram for descriptions of these fields.

Parameters:
ScopeFunction scope.
NameFunction name.
LinkageNameMangled function name.
FileFile where this variable is defined.
LineNoLine number.
TyFunction type.
isLocalToUnitTrue if this function is not externally visible..
isDefinitionTrue if this is a function definition.
VirtualityAttributes describing virtualness. e.g. pure virtual function.
VTableIndexIndex no of this method in virtual table.
VTableHolderType that holds vtable.
Flagse.g. is this function prototyped or not. This flags are used to emit dwarf attributes.
isOptimizedTrue if optimization is ON.
Fnllvm::Function pointer.
TParamFunction template parameters.

Definition at line 1253 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_subprogram, llvm::dwarf::DW_TAG_subroutine_type, llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::DIFile::getFileNode(), llvm::Type::getInt1Ty(), llvm::Type::getInt32Ty(), getNonCompileUnitScope(), llvm::Constant::getNullValue(), llvm::DIScope::getRef(), llvm::DIDescriptor::getTag(), GetTagConstant(), llvm::DIDescriptor::isSubprogram(), Node, and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().

createNameSpace - This creates new descriptor for a namespace with the specified parent scope.

Parameters:
ScopeNamespace scope
NameName of this namespace
FileSource file
LineNoLine number

createNameSpace - This creates new descriptor for a namespace with the specified parent scope.

Definition at line 1299 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_namespace, llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::DIFile::getFileNode(), llvm::Type::getInt32Ty(), getNonCompileUnitScope(), GetTagConstant(), and llvm::DINameSpace::Verify().

Create C++11 nullptr type.

Definition at line 256 of file DIBuilder.cpp.

References createUnspecifiedType().

DIDerivedType DIBuilder::createObjCIVar ( StringRef  Name,
DIFile  File,
unsigned  LineNumber,
uint64_t  SizeInBits,
uint64_t  AlignInBits,
uint64_t  OffsetInBits,
unsigned  Flags,
DIType  Ty,
StringRef  PropertyName = StringRef(),
StringRef  GetterName = StringRef(),
StringRef  SetterName = StringRef(),
unsigned  PropertyAttributes = 0 
)

createObjCIVar - Create debugging information entry for Objective-C instance variable.

Parameters:
NameMember name.
FileFile where this member is defined.
LineNoLine number.
SizeInBitsMember size.
AlignInBitsMember alignment.
OffsetInBitsMember offset.
FlagsFlags to encode member attribute, e.g. private
TyParent type.
PropertyNameName of the Objective C property associated with this ivar.
PropertyGetterNameName of the Objective C property getter selector.
PropertySetterNameName of the Objective C property setter selector.
PropertyAttributesObjective C property attributes.

createObjCIVar - Create debugging information entry for Objective-C instance variable.

Definition at line 473 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_member, llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::DIFile::getFileNode(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), getNonCompileUnitScope(), and GetTagConstant().

DIDerivedType DIBuilder::createObjCIVar ( StringRef  Name,
DIFile  File,
unsigned  LineNumber,
uint64_t  SizeInBits,
uint64_t  AlignInBits,
uint64_t  OffsetInBits,
unsigned  Flags,
DIType  Ty,
MDNode PropertyNode 
)

createObjCIVar - Create debugging information entry for Objective-C instance variable.

Parameters:
NameMember name.
FileFile where this member is defined.
LineNoLine number.
SizeInBitsMember size.
AlignInBitsMember alignment.
OffsetInBitsMember offset.
FlagsFlags to encode member attribute, e.g. private
TyParent type.
PropertyNodeProperty associated with this ivar.

createObjCIVar - Create debugging information entry for Objective-C instance variable.

Definition at line 500 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_member, llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::DIFile::getFileNode(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), getNonCompileUnitScope(), and GetTagConstant().

DIObjCProperty DIBuilder::createObjCProperty ( StringRef  Name,
DIFile  File,
unsigned  LineNumber,
StringRef  GetterName,
StringRef  SetterName,
unsigned  PropertyAttributes,
DIType  Ty 
)

createObjCProperty - Create debugging information entry for Objective-C property.

Parameters:
NameProperty name.
FileFile where this property is defined.
LineNumberLine number.
GetterNameName of the Objective C property getter selector.
SetterNameName of the Objective C property setter selector.
PropertyAttributesObjective C property attributes.
TyType.

createObjCProperty - Create debugging information entry for Objective-C property.

Definition at line 526 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_APPLE_property, llvm::ARMBuildAttrs::File, llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), and GetTagConstant().

createObjectPointerType - Create a new DIType with the "object pointer" flag set.

createObjectPointerType - Create a new type with both the object pointer and artificial flags set.

Definition at line 850 of file DIBuilder.cpp.

References llvm::DIDescriptor::FlagArtificial, llvm::DIDescriptor::FlagObjectPointer, llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::DIType::getFlags(), llvm::Type::getInt32Ty(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm::DIType::isObjectPointer(), N, and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().

DIDerivedType DIBuilder::createPointerType ( DIType  PointeeTy,
uint64_t  SizeInBits,
uint64_t  AlignInBits = 0,
StringRef  Name = StringRef() 
)

createPointerType - Create debugging information entry for a pointer.

createPointerType - Create debugging information entry for a pointer.

Parameters:
PointeeTyType pointed by this pointer.
SizeInBitsSize.
AlignInBitsAlignment. (optional)
NamePointer type name. (optional)

Definition at line 304 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_pointer_type, llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::DIScope::getRef(), and GetTagConstant().

createQualifiedType - Create debugging information entry for a qualified type, e.g. 'const int'.

Parameters:
TagTag identifing type, e.g. dwarf::TAG_volatile_type
FromTyBase Type.

createQualifiedType - Create debugging information entry for a qualified type, e.g. 'const int'.

Definition at line 285 of file DIBuilder.cpp.

References llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::DIScope::getRef(), and GetTagConstant().

createReferenceType - Create debugging information entry for a c++ style reference or rvalue reference type.

createReferenceType - Create debugging information entry for a reference type.

Definition at line 343 of file DIBuilder.cpp.

References llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::DIScope::getRef(), GetTagConstant(), and llvm::DIDescriptor::isType().

DICompositeType DIBuilder::createReplaceableForwardDecl ( unsigned  Tag,
StringRef  Name,
DIDescriptor  Scope,
DIFile  F,
unsigned  Line,
unsigned  RuntimeLang = 0,
uint64_t  SizeInBits = 0,
uint64_t  AlignInBits = 0,
StringRef  UniqueIdentifier = StringRef() 
)

Create a temporary forward-declared type.

createReplaceableForwardDecl - Create a temporary forward-declared type that can be RAUW'd if the full type is seen.

Definition at line 918 of file DIBuilder.cpp.

References llvm::StringRef::empty(), llvm::DIDescriptor::FlagFwdDecl, llvm::MDString::get(), llvm::ConstantInt::get(), llvm::DIFile::getFileNode(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), getNonCompileUnitScope(), llvm::DIScope::getRef(), GetTagConstant(), llvm::MDNode::getTemporary(), llvm::DIDescriptor::isCompositeType(), Node, and retainType().

DIDerivedType DIBuilder::createStaticMemberType ( DIDescriptor  Scope,
StringRef  Name,
DIFile  File,
unsigned  LineNumber,
DIType  Ty,
unsigned  Flags,
llvm::Value Val 
)

createStaticMemberType - Create debugging information entry for a C++ static data member.

Parameters:
ScopeMember scope.
NameMember name.
FileFile where this member is declared.
LineNoLine number.
TyType of the static member.
FlagsFlags to encode member attribute, e.g. private.
ValConst initializer of the member.

createStaticMemberType - Create debugging information entry for a C++ static data member.

Definition at line 448 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_member, llvm::DIDescriptor::FlagStaticMember, llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::DIFile::getFileNode(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), getNonCompileUnitScope(), llvm::DIScope::getRef(), and GetTagConstant().

DIGlobalVariable DIBuilder::createStaticVariable ( DIDescriptor  Context,
StringRef  Name,
StringRef  LinkageName,
DIFile  F,
unsigned  LineNumber,
DITypeRef  Ty,
bool  isLocalToUnit,
llvm::Value Val,
MDNode Decl = nullptr 
)

createStaticVariable - Create a new descriptor for the specified variable.

Parameters:
ContextVariable scope.
NameName of the variable.
LinkageNameMangled name of the variable.
FileFile where this variable is defined.
LineNoLine number.
TyVariable Type.
isLocalToUnitBoolean flag indicate whether this variable is externally visible or not.
Valllvm::Value of the variable.
DeclReference to the corresponding declaration.

createStaticVariable - Create a new descriptor for the specified variable.

Definition at line 1042 of file DIBuilder.cpp.

References createStaticVariableHelper(), llvm::MDNode::get(), Node, and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().

DICompositeType DIBuilder::createStructType ( DIDescriptor  Scope,
StringRef  Name,
DIFile  File,
unsigned  LineNumber,
uint64_t  SizeInBits,
uint64_t  AlignInBits,
unsigned  Flags,
DIType  DerivedFrom,
DIArray  Elements,
unsigned  RunTimeLang = 0,
DIType  VTableHolder = DIType(),
StringRef  UniqueIdentifier = StringRef() 
)

createStructType - Create debugging information entry for a struct.

createStructType - Create debugging information entry for a struct.

Parameters:
ScopeScope in which this struct is defined.
NameStruct name.
FileFile where this member is defined.
LineNumberLine number.
SizeInBitsMember size.
AlignInBitsMember alignment.
FlagsFlags to encode member attribute, e.g. private
ElementsStruct elements.
RunTimeLangOptional parameter, Objective-C runtime version.
UniqueIdentifierA unique identifier for the struct.

Definition at line 652 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_structure_type, llvm::StringRef::empty(), llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::DIFile::getFileNode(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), getNonCompileUnitScope(), llvm::DIScope::getRef(), GetTagConstant(), llvm::DIDescriptor::isCompositeType(), and retainType().

DISubroutineType DIBuilder::createSubroutineType ( DIFile  File,
DITypeArray  ParameterTypes,
unsigned  Flags = 0 
)

createSubroutineType - Create subroutine type.

createSubroutineType - Create subroutine type.

Parameters:
FileFile in which this subroutine is defined.
ParameterTypesAn array of subroutine parameter types. This includes return type at 0th index.
FlagsE.g.: LValueReference. These flags are used to emit dwarf attributes.

Definition at line 723 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_subroutine_type, llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::Constant::getNullValue(), and GetTagConstant().

DISubprogram DIBuilder::createTempFunctionFwdDecl ( DIDescriptor  Context,
StringRef  Name,
StringRef  LinkageName,
DIFile  File,
unsigned  LineNo,
DICompositeType  Ty,
bool  isLocalToUnit,
bool  isDefinition,
unsigned  ScopeLine,
unsigned  Flags = 0,
bool  isOptimized = false,
Function Fn = nullptr,
MDNode TParams = nullptr,
MDNode Decl = nullptr 
)

createTempFunctionFwdDecl - Identical to createFunction, except that the resulting DbgNode is meant to be RAUWed.

createTempFunctionFwdDecl - Create a new temporary descriptor for the specified function declaration.

Definition at line 1237 of file DIBuilder.cpp.

References createFunctionHelper(), and llvm::MDNode::getTemporary().

DITemplateValueParameter DIBuilder::createTemplateParameterPack ( DIDescriptor  Scope,
StringRef  Name,
DIType  Ty,
DIArray  Val,
MDNode File = nullptr,
unsigned  LineNo = 0,
unsigned  ColumnNo = 0 
)

Create debugging information for a template parameter pack.

Parameters:
ScopeScope in which this type is defined.
NameValue parameter name.
TyParameter type.
ValAn array of types in the pack.
FileFile where this type parameter is defined.
LineNoLine number.
ColumnNoColumn Number.

Definition at line 602 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_GNU_template_parameter_pack.

DITemplateValueParameter DIBuilder::createTemplateTemplateParameter ( DIDescriptor  Scope,
StringRef  Name,
DIType  Ty,
StringRef  Val,
MDNode File = nullptr,
unsigned  LineNo = 0,
unsigned  ColumnNo = 0 
)

Create debugging information for a template template parameter.

Parameters:
ScopeScope in which this type is defined.
NameValue parameter name.
TyParameter type.
ValThe fully qualified name of the template.
FileFile where this type parameter is defined.
LineNoLine number.
ColumnNoColumn Number.

Definition at line 592 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_GNU_template_template_param, and llvm::MDString::get().

DITemplateTypeParameter DIBuilder::createTemplateTypeParameter ( DIDescriptor  Context,
StringRef  Name,
DIType  Ty,
MDNode File = nullptr,
unsigned  LineNo = 0,
unsigned  ColumnNo = 0 
)

createTemplateTypeParameter - Create debugging information for template type parameter.

Parameters:
ScopeScope in which this type is defined.
NameType parameter name.
TyParameter type.
FileFile where this type parameter is defined.
LineNoLine number.
ColumnNoColumn Number.

createTemplateTypeParameter - Create debugging information for template type parameter.

Definition at line 545 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_template_type_parameter, llvm::ARMBuildAttrs::File, llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), getNonCompileUnitScope(), llvm::DIScope::getRef(), and GetTagConstant().

DITemplateValueParameter DIBuilder::createTemplateValueParameter ( DIDescriptor  Context,
StringRef  Name,
DIType  Ty,
Value Val,
MDNode File = nullptr,
unsigned  LineNo = 0,
unsigned  ColumnNo = 0 
)

createTemplateValueParameter - Create debugging information for template value parameter.

Parameters:
ScopeScope in which this type is defined.
NameValue parameter name.
TyParameter type.
ValConstant parameter value.
FileFile where this type parameter is defined.
LineNoLine number.
ColumnNoColumn Number.

createTemplateValueParameter - Create debugging information for template value parameter.

Definition at line 582 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_template_value_parameter.

DIGlobalVariable DIBuilder::createTempStaticVariableFwdDecl ( DIDescriptor  Context,
StringRef  Name,
StringRef  LinkageName,
DIFile  F,
unsigned  LineNumber,
DITypeRef  Ty,
bool  isLocalToUnit,
llvm::Value Val,
MDNode Decl = nullptr 
)

createTempStaticVariableFwdDecl - Identical to createStaticVariable except that the resulting DbgNode is temporary and meant to be RAUWed.

createTempStaticVariableFwdDecl - Create a new temporary descriptor for the specified variable declarartion.

Definition at line 1061 of file DIBuilder.cpp.

References createStaticVariableHelper(), and llvm::MDNode::getTemporary().

DIDerivedType DIBuilder::createTypedef ( DIType  Ty,
StringRef  Name,
DIFile  File,
unsigned  LineNo,
DIDescriptor  Context 
)

createTypedef - Create debugging information entry for a typedef.

createTypedef - Create debugging information entry for a typedef.

Parameters:
TyOriginal type.
NameTypedef name.
FileFile where this type is defined.
LineNoLine number.
ContextThe surrounding context for the typedef.

Definition at line 362 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_typedef, llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::DIFile::getFileNode(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), getNonCompileUnitScope(), llvm::DIScope::getRef(), and GetTagConstant().

DICompositeType DIBuilder::createUnionType ( DIDescriptor  Scope,
StringRef  Name,
DIFile  File,
unsigned  LineNumber,
uint64_t  SizeInBits,
uint64_t  AlignInBits,
unsigned  Flags,
DIArray  Elements,
unsigned  RunTimeLang = 0,
StringRef  UniqueIdentifier = StringRef() 
)

createUnionType - Create debugging information entry for an union.

createUnionType - Create debugging information entry for an union.

Parameters:
ScopeScope in which this union is defined.
NameUnion name.
FileFile where this member is defined.
LineNumberLine number.
SizeInBitsMember size.
AlignInBitsMember alignment.
FlagsFlags to encode member attribute, e.g. private
ElementsUnion elements.
RunTimeLangOptional parameter, Objective-C runtime version.
UniqueIdentifierA unique identifier for the union.

Definition at line 690 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_union_type, llvm::StringRef::empty(), llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::DIFile::getFileNode(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), getNonCompileUnitScope(), llvm::DIScope::getRef(), GetTagConstant(), and retainType().

createUnspecifiedParameter - Create unspecified parameter type for a subroutine type.

createUnspecifiedParameter - Create unspeicified type descriptor for the subroutine type.

Definition at line 878 of file DIBuilder.cpp.

DIVariable DIBuilder::createVariablePiece ( DIVariable  Variable,
unsigned  OffsetInBytes,
unsigned  SizeInBytes 
)

createVariablePiece - Create a descriptor to describe one part of aggregate variable that is fragmented across multiple Values.

Parameters:
VariableVariable that is partially represented by this.
OffsetInBytesOffset of the piece in bytes.
SizeInBytesSize of the piece in bytes.

createVariablePiece - Create a descriptor to describe one part of aggregate variable that is fragmented across multiple Values.

Definition at line 1135 of file DIBuilder.cpp.

References llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), llvm::DIVariable::isVariablePiece(), OpPiece, and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().

DICompositeType DIBuilder::createVectorType ( uint64_t  Size,
uint64_t  AlignInBits,
DIType  Ty,
DIArray  Subscripts 
)

createVectorType - Create debugging information entry for a vector.

createVectorType - Create debugging information entry for a vector type.

Parameters:
SizeArray size.
AlignInBitsAlignment.
TyElement type.
SubscriptsSubscripts.

Definition at line 804 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_array_type, llvm::DIDescriptor::FlagVector, llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::DIScope::getRef(), and GetTagConstant().

getOrCreateArray - Get a DIArray, create one if required.

Definition at line 951 of file DIBuilder.cpp.

References llvm::MDNode::get().

Referenced by finalize().

DISubrange DIBuilder::getOrCreateSubrange ( int64_t  Lo,
int64_t  Count 
)

getOrCreateSubrange - Create a descriptor for a value range. This implicitly uniques the values returned.

Definition at line 969 of file DIBuilder.cpp.

References llvm::dwarf::DW_TAG_subrange_type, llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt64Ty(), and GetTagConstant().

getOrCreateTypeArray - Get a DITypeArray, create one if required.

Definition at line 956 of file DIBuilder.cpp.

References llvm::MDNode::get(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), and llvm::ArrayRef< T >::size().

Instruction * DIBuilder::insertDbgValueIntrinsic ( llvm::Value Val,
uint64_t  Offset,
DIVariable  VarInfo,
BasicBlock InsertAtEnd 
)

insertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call.

insertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call.

Parameters:
Valllvm::Value of the variable
OffsetOffset
VarInfoVariable's debug info descriptor.
InsertAtEndLocation for the new intrinsic.

Definition at line 1406 of file DIBuilder.cpp.

References llvm::CallInst::Create(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Value::getContext(), llvm::Intrinsic::getDeclaration(), llvm::Type::getInt64Ty(), and llvm::DIDescriptor::isVariable().

Referenced by llvm::ConvertDebugDeclareToDebugValue().

Instruction * DIBuilder::insertDbgValueIntrinsic ( llvm::Value Val,
uint64_t  Offset,
DIVariable  VarInfo,
Instruction InsertBefore 
)

insertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call.

insertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call.

Parameters:
Valllvm::Value of the variable
OffsetOffset
VarInfoVariable's debug info descriptor.
InsertBeforeLocation for the new intrinsic.

Definition at line 1390 of file DIBuilder.cpp.

References llvm::CallInst::Create(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Value::getContext(), llvm::Intrinsic::getDeclaration(), llvm::Type::getInt64Ty(), and llvm::DIDescriptor::isVariable().

Instruction * DIBuilder::insertDeclare ( llvm::Value Storage,
DIVariable  VarInfo,
BasicBlock InsertAtEnd 
)

insertDeclare - Insert a new llvm.dbg.declare intrinsic call.

insertDeclare - Insert a new llvm.dbg.declare intrinsic call.

Parameters:
Storagellvm::Value of the variable
VarInfoVariable's debug info descriptor.
InsertAtEndLocation for the new intrinsic.

Definition at line 1371 of file DIBuilder.cpp.

References llvm::CallInst::Create(), llvm::MDNode::get(), llvm::Value::getContext(), llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getTerminator(), and llvm::DIDescriptor::isVariable().

Referenced by llvm::replaceDbgDeclareForAlloca().

Instruction * DIBuilder::insertDeclare ( llvm::Value Storage,
DIVariable  VarInfo,
Instruction InsertBefore 
)

insertDeclare - Insert a new llvm.dbg.declare intrinsic call.

insertDeclare - Insert a new llvm.dbg.declare intrinsic call.

Parameters:
Storagellvm::Value of the variable
VarInfoVariable's debug info descriptor.
InsertBeforeLocation for the new intrinsic.

Definition at line 1358 of file DIBuilder.cpp.

References llvm::CallInst::Create(), llvm::MDNode::get(), llvm::Value::getContext(), llvm::Intrinsic::getDeclaration(), and llvm::DIDescriptor::isVariable().

retainType - Retain DIType in a module even if it is not referenced through debug info anchors.

Definition at line 872 of file DIBuilder.cpp.

References llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().

Referenced by createClassType(), createEnumerationType(), createForwardDecl(), createReplaceableForwardDecl(), createStructType(), and createUnionType().


The documentation for this class was generated from the following files: