LLVM API Documentation
#include <DIBuilder.h>
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()) |
Instruction * | insertDeclare (llvm::Value *Storage, DIVariable VarInfo, BasicBlock *InsertAtEnd) |
insertDeclare - Insert a new llvm.dbg.declare intrinsic call. | |
Instruction * | insertDeclare (llvm::Value *Storage, DIVariable VarInfo, Instruction *InsertBefore) |
insertDeclare - Insert a new llvm.dbg.declare intrinsic call. | |
Instruction * | insertDbgValueIntrinsic (llvm::Value *Val, uint64_t Offset, DIVariable VarInfo, BasicBlock *InsertAtEnd) |
insertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call. | |
Instruction * | insertDbgValueIntrinsic (llvm::Value *Val, uint64_t Offset, DIVariable VarInfo, Instruction *InsertBefore) |
insertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call. |
Definition at line 54 of file DIBuilder.h.
Definition at line 88 of file DIBuilder.h.
Definition at line 89 of file DIBuilder.h.
DIBuilder::DIBuilder | ( | Module & | M | ) | [explicit] |
Definition at line 32 of file DIBuilder.cpp.
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.
Size | Array size. |
AlignInBits | Alignment. |
Ty | Element type. |
Subscripts | Subscripts. |
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().
createArtificialType - Create a new DIType with "artificial" flag set.
Definition at line 828 of file DIBuilder.cpp.
References llvm::DIDescriptor::FlagArtificial, llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::DIType::getFlags(), llvm::Type::getInt32Ty(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm::DIType::isArtificial(), N, and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
DIBasicType DIBuilder::createBasicType | ( | StringRef | Name, |
uint64_t | SizeInBits, | ||
uint64_t | AlignInBits, | ||
unsigned | Encoding | ||
) |
createBasicType - Create debugging information entry for a basic type.
Name | Type name. |
SizeInBits | Size of the type. |
AlignInBits | Type alignment. |
Encoding | DWARF 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.
Scope | Scope in which this class is defined. |
Name | class name. |
File | File where this member is defined. |
LineNumber | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
OffsetInBits | Member offset. |
Flags | Flags to encode member attribute, e.g. private |
Elements | class members. |
VTableHolder | Debug 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. |
TemplateParms | Template type parameters. |
UniqueIdentifier | A 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.
Lang | Source programming language, eg. dwarf::DW_LANG_C99 |
File | File name |
Dir | Directory |
Producer | Identify the producer of debugging information and code. Usually this is a compiler version string. |
isOptimized | A boolean flag which indicates whether optimization is ON or not. |
Flags | This 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. |
RV | This indicates runtime version for languages like Objective-C. |
SplitName | The name of the file that we'll split debug info out into. |
Kind | The kind of debug information to generate. |
EmitDebugInfo | A 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.
Tag | Dwarf TAG. Usually DW_TAG_auto_variable or DW_TAG_arg_variable. |
Scope | Variable scope. |
Name | Variable name. |
F | File where this variable is defined. |
LineNo | Line number. |
Ty | Variable Type |
Addr | An array of complex address operations. |
ArgNo | If 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.
Scope | Scope in which this enumeration is defined. |
Name | Union name. |
File | File where this member is defined. |
LineNumber | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
Elements | Enumeration elements. |
UnderlyingType | Underlying type of a C++11/ObjC fixed enum. |
UniqueIdentifier | A 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 | ||
) |
createEnumerator - Create a single enumerator value.
Definition at line 225 of file DIBuilder.cpp.
References llvm::dwarf::DW_TAG_enumerator, llvm::StringRef::empty(), llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt64Ty(), and GetTagConstant().
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() |
||
) |
Create a permanent forward-declared type.
createForwardDecl - Create a permanent forward-declared type.
Definition at line 884 of file DIBuilder.cpp.
References llvm::StringRef::empty(), llvm::DIDescriptor::FlagFwdDecl, 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(), Node, and retainType().
DIDerivedType DIBuilder::createFriend | ( | DIType | Ty, |
DIType | FriendTy | ||
) |
createFriend - Create debugging information entry for a 'friend'.
Definition at line 381 of file DIBuilder.cpp.
References llvm::dwarf::DW_TAG_friend, llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::DIScope::getRef(), GetTagConstant(), and llvm::DIDescriptor::isType().
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.
Scope | Function scope. |
Name | Function name. |
LinkageName | Mangled function name. |
File | File where this variable is defined. |
LineNo | Line number. |
Ty | Function type. |
isLocalToUnit | True if this function is not externally visible. |
isDefinition | True if this is a function definition. |
ScopeLine | Set to the beginning of the scope this starts |
Flags | e.g. is this function prototyped or not. These flags are used to emit dwarf attributes. |
isOptimized | True if optimization is ON. |
Fn | llvm::Function pointer. |
TParam | Function 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.
Name | Name of the variable. |
File | File where this variable is defined. |
LineNo | Line number. |
Ty | Variable Type. |
isLocalToUnit | Boolean flag indicate whether this variable is externally visible or not. |
Val | llvm::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.
Name | Name of the variable. |
LinkageName | Mangled variable name. |
File | File where this variable is defined. |
LineNo | Line number. |
Ty | Variable Type. |
isLocalToUnit | Boolean flag indicate whether this variable is externally visible or not. |
Val | llvm::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().
DIImportedEntity DIBuilder::createImportedDeclaration | ( | DIScope | Context, |
DIScope | Decl, | ||
unsigned | Line, | ||
StringRef | Name = StringRef() |
||
) |
Create a descriptor for an imported function.
Context | The scope this module is imported into |
Decl | The declaration (or definition) of a function, type, or variable |
Line | Line number |
Definition at line 199 of file DIBuilder.cpp.
References createImportedModule(), llvm::dwarf::DW_TAG_imported_declaration, llvm::DIScope::getRef(), and Name.
DIImportedEntity DIBuilder::createImportedDeclaration | ( | DIScope | Context, |
DIImportedEntity | NS, | ||
unsigned | Line, | ||
StringRef | Name = StringRef() |
||
) |
Definition at line 207 of file DIBuilder.cpp.
References createImportedModule(), and llvm::dwarf::DW_TAG_imported_declaration.
DIImportedEntity DIBuilder::createImportedModule | ( | DIScope | Context, |
DINameSpace | NS, | ||
unsigned | Line | ||
) |
Create a descriptor for an imported module.
Context | The scope this module is imported into |
NS | The namespace being imported here |
Line | Line number |
Definition at line 185 of file DIBuilder.cpp.
References llvm::dwarf::DW_TAG_imported_module.
Referenced by createImportedDeclaration(), and createImportedModule().
DIImportedEntity DIBuilder::createImportedModule | ( | DIScope | Context, |
DIImportedEntity | NS, | ||
unsigned | Line | ||
) |
Create a descriptor for an imported module.
Context | The scope this module is imported into |
NS | An aliased namespace |
Line | Line 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.
Ty | Original type. |
BaseTy | Base type. Ty is inherits from base. |
BaseOffset | Base offset. |
Flags | Flags 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().
DILexicalBlock DIBuilder::createLexicalBlock | ( | DIDescriptor | Scope, |
DIFile | File, | ||
unsigned | Line, | ||
unsigned | Col | ||
) |
createLexicalBlock - This creates a descriptor for a lexical block with the specified parent context.
Scope | Parent lexical scope. |
File | Source file. |
Line | Line number. |
Col | Column 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().
DILexicalBlockFile DIBuilder::createLexicalBlockFile | ( | DIDescriptor | Scope, |
DIFile | File, | ||
unsigned | Discriminator = 0 |
||
) |
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.
Scope | Lexical block. |
File | Source file. |
Discriminator | DWARF 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.
Tag | Dwarf TAG. Usually DW_TAG_auto_variable or DW_TAG_arg_variable. |
Scope | Variable scope. |
Name | Variable name. |
File | File where this variable is defined. |
LineNo | Line number. |
Ty | Variable Type |
AlwaysPreserve | Boolean. Set to true if debug info for this variable should be preserved in optimized build. |
Flags | Flags, e.g. artificial variable. |
ArgNo | If 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.
DIDerivedType DIBuilder::createMemberPointerType | ( | DIType | PointeeTy, |
DIType | Class | ||
) |
Create debugging information entry for a pointer to member.
PointeeTy | Type pointed to by this pointer. |
Class | Type 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.
Scope | Member scope. |
Name | Member name. |
File | File where this member is defined. |
LineNo | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
OffsetInBits | Member offset. |
Flags | Flags to encode member attribute, e.g. private |
Ty | Parent 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.
Scope | Function scope. |
Name | Function name. |
LinkageName | Mangled function name. |
File | File where this variable is defined. |
LineNo | Line number. |
Ty | Function type. |
isLocalToUnit | True if this function is not externally visible.. |
isDefinition | True if this is a function definition. |
Virtuality | Attributes describing virtualness. e.g. pure virtual function. |
VTableIndex | Index no of this method in virtual table. |
VTableHolder | Type that holds vtable. |
Flags | e.g. is this function prototyped or not. This flags are used to emit dwarf attributes. |
isOptimized | True if optimization is ON. |
Fn | llvm::Function pointer. |
TParam | Function 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().
DINameSpace DIBuilder::createNameSpace | ( | DIDescriptor | Scope, |
StringRef | Name, | ||
DIFile | File, | ||
unsigned | LineNo | ||
) |
createNameSpace - This creates new descriptor for a namespace with the specified parent scope.
Scope | Namespace scope |
Name | Name of this namespace |
File | Source file |
LineNo | Line 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.
Name | Member name. |
File | File where this member is defined. |
LineNo | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
OffsetInBits | Member offset. |
Flags | Flags to encode member attribute, e.g. private |
Ty | Parent type. |
PropertyName | Name of the Objective C property associated with this ivar. |
PropertyGetterName | Name of the Objective C property getter selector. |
PropertySetterName | Name of the Objective C property setter selector. |
PropertyAttributes | Objective 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.
Name | Member name. |
File | File where this member is defined. |
LineNo | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
OffsetInBits | Member offset. |
Flags | Flags to encode member attribute, e.g. private |
Ty | Parent type. |
PropertyNode | Property 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.
Name | Property name. |
File | File where this property is defined. |
LineNumber | Line number. |
GetterName | Name of the Objective C property getter selector. |
SetterName | Name of the Objective C property setter selector. |
PropertyAttributes | Objective C property attributes. |
Ty | Type. |
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.
PointeeTy | Type pointed by this pointer. |
SizeInBits | Size. |
AlignInBits | Alignment. (optional) |
Name | Pointer 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().
DIDerivedType DIBuilder::createQualifiedType | ( | unsigned | Tag, |
DIType | FromTy | ||
) |
createQualifiedType - Create debugging information entry for a qualified type, e.g. 'const int'.
Tag | Tag identifing type, e.g. dwarf::TAG_volatile_type |
FromTy | Base 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().
DIDerivedType DIBuilder::createReferenceType | ( | unsigned | Tag, |
DIType | RTy | ||
) |
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.
Scope | Member scope. |
Name | Member name. |
File | File where this member is declared. |
LineNo | Line number. |
Ty | Type of the static member. |
Flags | Flags to encode member attribute, e.g. private. |
Val | Const 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.
Context | Variable scope. |
Name | Name of the variable. |
LinkageName | Mangled name of the variable. |
File | File where this variable is defined. |
LineNo | Line number. |
Ty | Variable Type. |
isLocalToUnit | Boolean flag indicate whether this variable is externally visible or not. |
Val | llvm::Value of the variable. |
Decl | Reference 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.
Scope | Scope in which this struct is defined. |
Name | Struct name. |
File | File where this member is defined. |
LineNumber | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
Flags | Flags to encode member attribute, e.g. private |
Elements | Struct elements. |
RunTimeLang | Optional parameter, Objective-C runtime version. |
UniqueIdentifier | A 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.
File | File in which this subroutine is defined. |
ParameterTypes | An array of subroutine parameter types. This includes return type at 0th index. |
Flags | E.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.
Scope | Scope in which this type is defined. |
Name | Value parameter name. |
Ty | Parameter type. |
Val | An array of types in the pack. |
File | File where this type parameter is defined. |
LineNo | Line number. |
ColumnNo | Column 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.
Scope | Scope in which this type is defined. |
Name | Value parameter name. |
Ty | Parameter type. |
Val | The fully qualified name of the template. |
File | File where this type parameter is defined. |
LineNo | Line number. |
ColumnNo | Column 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.
Scope | Scope in which this type is defined. |
Name | Type parameter name. |
Ty | Parameter type. |
File | File where this type parameter is defined. |
LineNo | Line number. |
ColumnNo | Column 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.
Scope | Scope in which this type is defined. |
Name | Value parameter name. |
Ty | Parameter type. |
Val | Constant parameter value. |
File | File where this type parameter is defined. |
LineNo | Line number. |
ColumnNo | Column 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.
Ty | Original type. |
Name | Typedef name. |
File | File where this type is defined. |
LineNo | Line number. |
Context | The 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.
Scope | Scope in which this union is defined. |
Name | Union name. |
File | File where this member is defined. |
LineNumber | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
Flags | Flags to encode member attribute, e.g. private |
Elements | Union elements. |
RunTimeLang | Optional parameter, Objective-C runtime version. |
UniqueIdentifier | A 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.
Create a DWARF unspecified type.
Definition at line 236 of file DIBuilder.cpp.
References llvm::dwarf::DW_TAG_unspecified_type, llvm::StringRef::empty(), llvm::MDString::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), and GetTagConstant().
Referenced by createNullPtrType().
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.
Variable | Variable that is partially represented by this. |
OffsetInBytes | Offset of the piece in bytes. |
SizeInBytes | Size 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.
Size | Array size. |
AlignInBits | Alignment. |
Ty | Element type. |
Subscripts | Subscripts. |
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().
void DIBuilder::finalize | ( | ) |
finalize - Construct any deferred debug info descriptors.
Definition at line 38 of file DIBuilder.cpp.
References llvm::DITypedArray< T >::getElement(), llvm::getFnSpecificMDNode(), llvm::DITypedArray< T >::getNumElements(), getOrCreateArray(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::DIDescriptor::replaceAllUsesWith(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
DIArray DIBuilder::getOrCreateArray | ( | ArrayRef< Value * > | Elements | ) |
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().
DITypeArray DIBuilder::getOrCreateTypeArray | ( | ArrayRef< Value * > | Elements | ) |
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.
Val | llvm::Value of the variable |
Offset | Offset |
VarInfo | Variable's debug info descriptor. |
InsertAtEnd | Location 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.
Val | llvm::Value of the variable |
Offset | Offset |
VarInfo | Variable's debug info descriptor. |
InsertBefore | Location 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.
Storage | llvm::Value of the variable |
VarInfo | Variable's debug info descriptor. |
InsertAtEnd | Location 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.
Storage | llvm::Value of the variable |
VarInfo | Variable's debug info descriptor. |
InsertBefore | Location 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().
void DIBuilder::retainType | ( | DIType | T | ) |
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().