LLVM API Documentation

llvm::DIFactory Class Reference

#include <DebugInfo.h>

Collaboration diagram for llvm::DIFactory:
[legend]

List of all members.

Public Member Functions

 DIFactory (Module &m)
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="", unsigned RunTimeVer=0)
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, unsigned RunTimeLang=0)
 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.


Detailed Description

DIFactory - This object assists with the construction of the various descriptors.

Definition at line 421 of file DebugInfo.h.


Constructor & Destructor Documentation

DIFactory::DIFactory ( Module &  m  )  [explicit]

Definition at line 469 of file DebugInfo.cpp.

References llvm::StructType::get(), and llvm::PointerType::getUnqual().


Member Function Documentation

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 519 of file DebugInfo.cpp.

References llvm::SmallVectorImpl< T >::data(), Entry, llvm::ArrayType::get(), llvm::ConstantArray::get(), llvm::Value::getType(), GV, 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 542 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::Type::getInt64Ty(), llvm::Value::getType(), GV, 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 = "",
unsigned  RunTimeVer = 0 
)

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 570 of file DebugInfo.cpp.

References llvm::Module::addTypeName(), llvm::dwarf::DW_TAG_compile_unit, llvm::ConstantStruct::get(), llvm::ConstantInt::get(), llvm::Type::getInt1Ty(), llvm::Type::getInt32Ty(), llvm::Constant::getNullValue(), llvm::Value::getType(), GV, llvm::GlobalValue::InternalLinkage, and llvm::GlobalValue::setSection().

DIEnumerator DIFactory::CreateEnumerator ( const std::string &  Name,
uint64_t  Val 
)

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 
)

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 657 of file DebugInfo.cpp.

References llvm::Module::addTypeName(), llvm::ConstantStruct::get(), llvm::ConstantInt::get(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::Value::getType(), GV, 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,
unsigned  RunTimeLang = 0 
)

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 735 of file DebugInfo.cpp.

References llvm::Module::addTypeName(), llvm::dwarf::DW_TAG_subprogram, llvm::ConstantStruct::get(), llvm::ConstantInt::get(), llvm::Type::getInt1Ty(), llvm::Type::getInt32Ty(), llvm::Constant::getNullValue(), llvm::Value::getType(), GV, 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 
)

DIVariable DIFactory::CreateVariable ( unsigned  Tag,
DIDescriptor  Context,
const std::string &  Name,
DICompileUnit  CompileUnit,
unsigned  LineNo,
DIType  Type 
)

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 VMContext.

Definition at line 832 of file DebugInfo.cpp.

References llvm::Module::addTypeName(), llvm::dwarf::DW_TAG_lexical_block, llvm::ConstantStruct::get(), llvm::Value::getType(), GV, 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 856 of file DebugInfo.cpp.

References llvm::CallInst::Create(), llvm::Intrinsic::dbg_stoppoint, llvm::ConstantInt::get(), llvm::Intrinsic::getDeclaration(), and llvm::Type::getInt32Ty().

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 875 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 886 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 897 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 907 of file DebugInfo.cpp.

References llvm::CallInst::Create(), llvm::Intrinsic::dbg_declare, and llvm::Intrinsic::getDeclaration().


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