LLVM API Documentation
#include <DebugInfo.h>
Public Member Functions | |
| DIFactory (Module &m) | |
| DIAnchor | GetOrCreateCompileUnitAnchor () |
| DIAnchor | GetOrCreateSubprogramAnchor () |
| DIAnchor | GetOrCreateGlobalVariableAnchor () |
| DIArray | GetOrCreateArray (DIDescriptor *Tys, unsigned NumTys) |
| DISubrange | GetOrCreateSubrange (int64_t Lo, int64_t Hi) |
| DICompileUnit | CreateCompileUnit (unsigned LangID, const std::string &Filename, const std::string &Directory, const std::string &Producer, bool isMain=false, bool isOptimized=false, const char *Flags="") |
| DIEnumerator | CreateEnumerator (const std::string &Name, uint64_t Val) |
| CreateEnumerator - Create a single enumerator value. | |
| DIBasicType | CreateBasicType (DIDescriptor Context, const std::string &Name, DICompileUnit CompileUnit, unsigned LineNumber, uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags, unsigned Encoding) |
| CreateBasicType - Create a basic type like int, float, etc. | |
| DIDerivedType | CreateDerivedType (unsigned Tag, DIDescriptor Context, const std::string &Name, DICompileUnit CompileUnit, unsigned LineNumber, uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags, DIType DerivedFrom) |
| DICompositeType | CreateCompositeType (unsigned Tag, DIDescriptor Context, const std::string &Name, DICompileUnit CompileUnit, unsigned LineNumber, uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags, DIType DerivedFrom, DIArray Elements) |
| CreateCompositeType - Create a composite type like array, struct, etc. | |
| DISubprogram | CreateSubprogram (DIDescriptor Context, const std::string &Name, const std::string &DisplayName, const std::string &LinkageName, DICompileUnit CompileUnit, unsigned LineNo, DIType Type, bool isLocalToUnit, bool isDefinition) |
| DIGlobalVariable | CreateGlobalVariable (DIDescriptor Context, const std::string &Name, const std::string &DisplayName, const std::string &LinkageName, DICompileUnit CompileUnit, unsigned LineNo, DIType Type, bool isLocalToUnit, bool isDefinition, llvm::GlobalVariable *GV) |
| CreateGlobalVariable - Create a new descriptor for the specified global. | |
| DIVariable | CreateVariable (unsigned Tag, DIDescriptor Context, const std::string &Name, DICompileUnit CompileUnit, unsigned LineNo, DIType Type) |
| CreateVariable - Create a new descriptor for the specified variable. | |
| DIBlock | CreateBlock (DIDescriptor Context) |
| void | InsertStopPoint (DICompileUnit CU, unsigned LineNo, unsigned ColNo, BasicBlock *BB) |
| void | InsertSubprogramStart (DISubprogram SP, BasicBlock *BB) |
| void | InsertRegionStart (DIDescriptor D, BasicBlock *BB) |
| void | InsertRegionEnd (DIDescriptor D, BasicBlock *BB) |
| void | InsertDeclare (llvm::Value *Storage, DIVariable D, BasicBlock *BB) |
| InsertDeclare - Insert a new llvm.dbg.declare intrinsic call. | |
Definition at line 335 of file DebugInfo.h.
| DIFactory::DIFactory | ( | Module & | m | ) | [explicit] |
Definition at line 282 of file DebugInfo.cpp.
References llvm::StructType::get(), and llvm::PointerType::getUnqual().
| DIAnchor DIFactory::GetOrCreateCompileUnitAnchor | ( | ) |
GetOrCreateCompileUnitAnchor - Return the anchor for compile units, creating a new one if there isn't already one in the module.
GetOrCreateCompileUnitAnchor - Return the anchor for compile units, creating a new one if there isn't already one in the module.
Definition at line 361 of file DebugInfo.cpp.
References llvm::dwarf::DW_TAG_compile_unit, and llvm::DIDescriptor::isNull().
Referenced by CreateCompileUnit().
| DIAnchor DIFactory::GetOrCreateSubprogramAnchor | ( | ) |
GetOrCreateSubprogramAnchor - Return the anchor for subprograms, creating a new one if there isn't already one in the module.
GetOrCreateSubprogramAnchor - Return the anchor for subprograms, creating a new one if there isn't already one in the module.
Definition at line 371 of file DebugInfo.cpp.
References llvm::dwarf::DW_TAG_subprogram, and llvm::DIDescriptor::isNull().
Referenced by CreateSubprogram().
| DIAnchor DIFactory::GetOrCreateGlobalVariableAnchor | ( | ) |
GetOrCreateGlobalVariableAnchor - Return the anchor for globals, creating a new one if there isn't already one in the module.
GetOrCreateGlobalVariableAnchor - Return the anchor for globals, creating a new one if there isn't already one in the module.
Definition at line 381 of file DebugInfo.cpp.
References llvm::dwarf::DW_TAG_variable, and llvm::DIDescriptor::isNull().
Referenced by CreateGlobalVariable().
| DIArray DIFactory::GetOrCreateArray | ( | DIDescriptor * | Tys, | |
| unsigned | NumTys | |||
| ) |
GetOrCreateArray - Create an descriptor for an array of descriptors. This implicitly uniques the arrays created.
GetOrCreateArray - Create an descriptor for an array of descriptors. This implicitly uniques the arrays created.
Definition at line 391 of file DebugInfo.cpp.
References Entry, llvm::ArrayType::get(), llvm::ConstantArray::get(), llvm::Value::getType(), llvm::GlobalValue::InternalLinkage, llvm::SmallVectorImpl< T >::push_back(), llvm::GlobalValue::setSection(), and llvm::SmallVectorImpl< T >::size().
| DISubrange DIFactory::GetOrCreateSubrange | ( | int64_t | Lo, | |
| int64_t | Hi | |||
| ) |
GetOrCreateSubrange - Create a descriptor for a value range. This implicitly uniques the values returned.
GetOrCreateSubrange - Create a descriptor for a value range. This implicitly uniques the values returned.
Definition at line 414 of file DebugInfo.cpp.
References llvm::Module::addTypeName(), llvm::dwarf::DW_TAG_subrange_type, Entry, llvm::ConstantStruct::get(), llvm::ConstantInt::get(), llvm::DIDescriptor::getGV(), llvm::Value::getType(), llvm::Type::Int64Ty, llvm::GlobalValue::InternalLinkage, llvm::DIDescriptor::isNull(), and llvm::GlobalValue::setSection().
| DICompileUnit DIFactory::CreateCompileUnit | ( | unsigned | LangID, | |
| const std::string & | Filename, | |||
| const std::string & | Directory, | |||
| const std::string & | Producer, | |||
| bool | isMain = false, |
|||
| bool | isOptimized = false, |
|||
| const char * | Flags = "" | |||
| ) |
CreateCompileUnit - Create a new descriptor for the specified compile unit.
CreateCompileUnit - Create a new descriptor for the specified compile unit. Note that this does not unique compile units within the module.
Definition at line 441 of file DebugInfo.cpp.
References llvm::Module::addTypeName(), llvm::dwarf::DW_TAG_compile_unit, llvm::ConstantStruct::get(), llvm::ConstantInt::get(), GetOrCreateCompileUnitAnchor(), llvm::Value::getType(), llvm::Type::Int1Ty, llvm::Type::Int32Ty, llvm::GlobalValue::InternalLinkage, and llvm::GlobalValue::setSection().
| DIEnumerator DIFactory::CreateEnumerator | ( | const std::string & | Name, | |
| uint64_t | Val | |||
| ) |
CreateEnumerator - Create a single enumerator value.
Definition at line 471 of file DebugInfo.cpp.
References llvm::Module::addTypeName(), llvm::dwarf::DW_TAG_enumerator, llvm::ConstantStruct::get(), llvm::ConstantInt::get(), llvm::Value::getType(), llvm::Type::Int64Ty, llvm::GlobalValue::InternalLinkage, and llvm::GlobalValue::setSection().
| DIBasicType DIFactory::CreateBasicType | ( | DIDescriptor | Context, | |
| const std::string & | Name, | |||
| DICompileUnit | CompileUnit, | |||
| unsigned | LineNumber, | |||
| uint64_t | SizeInBits, | |||
| uint64_t | AlignInBits, | |||
| uint64_t | OffsetInBits, | |||
| unsigned | Flags, | |||
| unsigned | Encoding | |||
| ) |
CreateBasicType - Create a basic type like int, float, etc.
Definition at line 490 of file DebugInfo.cpp.
References llvm::Module::addTypeName(), llvm::dwarf::DW_TAG_base_type, llvm::ConstantStruct::get(), llvm::ConstantInt::get(), llvm::Value::getType(), llvm::Type::Int32Ty, llvm::Type::Int64Ty, llvm::GlobalValue::InternalLinkage, and llvm::GlobalValue::setSection().
| DIDerivedType DIFactory::CreateDerivedType | ( | unsigned | Tag, | |
| DIDescriptor | Context, | |||
| const std::string & | Name, | |||
| DICompileUnit | CompileUnit, | |||
| unsigned | LineNumber, | |||
| uint64_t | SizeInBits, | |||
| uint64_t | AlignInBits, | |||
| uint64_t | OffsetInBits, | |||
| unsigned | Flags, | |||
| DIType | DerivedFrom | |||
| ) |
CreateDerivedType - Create a derived type like const qualified type, pointer, typedef, etc.
CreateDerivedType - Create a derived type like const qualified type, pointer, typedef, etc.
Definition at line 523 of file DebugInfo.cpp.
References llvm::Module::addTypeName(), llvm::ConstantStruct::get(), llvm::ConstantInt::get(), llvm::Value::getType(), llvm::Type::Int32Ty, llvm::Type::Int64Ty, llvm::GlobalValue::InternalLinkage, and llvm::GlobalValue::setSection().
| DICompositeType DIFactory::CreateCompositeType | ( | unsigned | Tag, | |
| DIDescriptor | Context, | |||
| const std::string & | Name, | |||
| DICompileUnit | CompileUnit, | |||
| unsigned | LineNumber, | |||
| uint64_t | SizeInBits, | |||
| uint64_t | AlignInBits, | |||
| uint64_t | OffsetInBits, | |||
| unsigned | Flags, | |||
| DIType | DerivedFrom, | |||
| DIArray | Elements | |||
| ) |
CreateCompositeType - Create a composite type like array, struct, etc.
Definition at line 557 of file DebugInfo.cpp.
References llvm::Module::addTypeName(), llvm::ConstantStruct::get(), llvm::ConstantInt::get(), llvm::Value::getType(), llvm::Type::Int32Ty, llvm::Type::Int64Ty, llvm::GlobalValue::InternalLinkage, and llvm::GlobalValue::setSection().
| DISubprogram DIFactory::CreateSubprogram | ( | DIDescriptor | Context, | |
| const std::string & | Name, | |||
| const std::string & | DisplayName, | |||
| const std::string & | LinkageName, | |||
| DICompileUnit | CompileUnit, | |||
| unsigned | LineNo, | |||
| DIType | Type, | |||
| bool | isLocalToUnit, | |||
| bool | isDefinition | |||
| ) |
CreateSubprogram - Create a new descriptor for the specified subprogram. See comments in DISubprogram for descriptions of these fields.
CreateSubprogram - Create a new descriptor for the specified subprogram. See comments in DISubprogram for descriptions of these fields. This method does not unique the generated descriptors.
Definition at line 597 of file DebugInfo.cpp.
References llvm::Module::addTypeName(), llvm::dwarf::DW_TAG_subprogram, llvm::ConstantStruct::get(), llvm::ConstantInt::get(), GetOrCreateSubprogramAnchor(), llvm::Value::getType(), llvm::Type::Int1Ty, llvm::Type::Int32Ty, llvm::GlobalValue::InternalLinkage, and llvm::GlobalValue::setSection().
| DIGlobalVariable DIFactory::CreateGlobalVariable | ( | DIDescriptor | Context, | |
| const std::string & | Name, | |||
| const std::string & | DisplayName, | |||
| const std::string & | LinkageName, | |||
| DICompileUnit | CompileUnit, | |||
| unsigned | LineNo, | |||
| DIType | Type, | |||
| bool | isLocalToUnit, | |||
| bool | isDefinition, | |||
| llvm::GlobalVariable * | GV | |||
| ) |
CreateGlobalVariable - Create a new descriptor for the specified global.
Definition at line 632 of file DebugInfo.cpp.
References llvm::Module::addTypeName(), llvm::dwarf::DW_TAG_variable, llvm::ConstantStruct::get(), llvm::ConstantInt::get(), llvm::ConstantExpr::getBitCast(), GetOrCreateGlobalVariableAnchor(), llvm::Value::getType(), llvm::Type::Int1Ty, llvm::Type::Int32Ty, llvm::GlobalValue::InternalLinkage, and llvm::GlobalValue::setSection().
| DIVariable DIFactory::CreateVariable | ( | unsigned | Tag, | |
| DIDescriptor | Context, | |||
| const std::string & | Name, | |||
| DICompileUnit | CompileUnit, | |||
| unsigned | LineNo, | |||
| DIType | Type | |||
| ) |
CreateVariable - Create a new descriptor for the specified variable.
Definition at line 665 of file DebugInfo.cpp.
References llvm::Module::addTypeName(), llvm::ConstantStruct::get(), llvm::ConstantInt::get(), llvm::Value::getType(), llvm::Type::Int32Ty, llvm::GlobalValue::InternalLinkage, and llvm::GlobalValue::setSection().
| DIBlock DIFactory::CreateBlock | ( | DIDescriptor | Context | ) |
CreateBlock - This creates a descriptor for a lexical block with the specified parent context.
CreateBlock - This creates a descriptor for a lexical block with the specified parent context.
Definition at line 691 of file DebugInfo.cpp.
References llvm::Module::addTypeName(), llvm::dwarf::DW_TAG_lexical_block, llvm::ConstantStruct::get(), llvm::Value::getType(), llvm::GlobalValue::InternalLinkage, and llvm::GlobalValue::setSection().
| void DIFactory::InsertStopPoint | ( | DICompileUnit | CU, | |
| unsigned | LineNo, | |||
| unsigned | ColNo, | |||
| BasicBlock * | BB | |||
| ) |
InsertStopPoint - Create a new llvm.dbg.stoppoint intrinsic invocation, inserting it at the end of the specified basic block.
InsertStopPoint - Create a new llvm.dbg.stoppoint intrinsic invocation, inserting it at the end of the specified basic block.
Definition at line 714 of file DebugInfo.cpp.
References llvm::CallInst::Create(), llvm::Intrinsic::dbg_stoppoint, llvm::ConstantInt::get(), llvm::Intrinsic::getDeclaration(), and llvm::Type::Int32Ty.
| void DIFactory::InsertSubprogramStart | ( | DISubprogram | SP, | |
| BasicBlock * | BB | |||
| ) |
InsertSubprogramStart - Create a new llvm.dbg.func.start intrinsic to mark the start of the specified subprogram.
InsertSubprogramStart - Create a new llvm.dbg.func.start intrinsic to mark the start of the specified subprogram.
Definition at line 733 of file DebugInfo.cpp.
References llvm::CallInst::Create(), llvm::Intrinsic::dbg_func_start, and llvm::Intrinsic::getDeclaration().
| void DIFactory::InsertRegionStart | ( | DIDescriptor | D, | |
| BasicBlock * | BB | |||
| ) |
InsertRegionStart - Insert a new llvm.dbg.region.start intrinsic call to mark the start of a region for the specified scoping descriptor.
InsertRegionStart - Insert a new llvm.dbg.region.start intrinsic call to mark the start of a region for the specified scoping descriptor.
Definition at line 745 of file DebugInfo.cpp.
References llvm::CallInst::Create(), llvm::Intrinsic::dbg_region_start, and llvm::Intrinsic::getDeclaration().
| void DIFactory::InsertRegionEnd | ( | DIDescriptor | D, | |
| BasicBlock * | BB | |||
| ) |
InsertRegionEnd - Insert a new llvm.dbg.region.end intrinsic call to mark the end of a region for the specified scoping descriptor.
InsertRegionEnd - Insert a new llvm.dbg.region.end intrinsic call to mark the end of a region for the specified scoping descriptor.
Definition at line 757 of file DebugInfo.cpp.
References llvm::CallInst::Create(), llvm::Intrinsic::dbg_region_end, and llvm::Intrinsic::getDeclaration().
| void DIFactory::InsertDeclare | ( | llvm::Value * | Storage, | |
| DIVariable | D, | |||
| BasicBlock * | BB | |||
| ) |
InsertDeclare - Insert a new llvm.dbg.declare intrinsic call.
Definition at line 767 of file DebugInfo.cpp.
References llvm::CallInst::Create(), llvm::Intrinsic::dbg_declare, and llvm::Intrinsic::getDeclaration().