LLVM API Documentation
DIScope - A base class for various scopes. More...
#include <DebugInfo.h>
Public Member Functions | |
DIScope (const MDNode *N=0) | |
DIScopeRef | getContext () const |
StringRef | getName () const |
If the scope node has a name, return that, else return an empty string. More... | |
StringRef | getFilename () const |
StringRef | getDirectory () const |
DIScopeRef | getRef () const |
![]() | |
DIDescriptor (const MDNode *N=0) | |
bool | Verify () const |
operator MDNode * () const | |
MDNode * | operator-> () const |
LLVM_EXPLICIT | operator bool () const |
bool | operator== (DIDescriptor Other) const |
bool | operator!= (DIDescriptor Other) const |
uint16_t | getTag () const |
bool | isDerivedType () const |
isDerivedType - Return true if the specified tag is legal for DIDerivedType. More... | |
bool | isCompositeType () const |
bool | isBasicType () const |
bool | isVariable () const |
isVariable - Return true if the specified tag is legal for DIVariable. More... | |
bool | isSubprogram () const |
bool | isGlobalVariable () const |
bool | isScope () const |
bool | isFile () const |
isFile - Return true if the specified tag is DW_TAG_file_type. More... | |
bool | isCompileUnit () const |
isCompileUnit - Return true if the specified tag is DW_TAG_compile_unit. More... | |
bool | isNameSpace () const |
isNameSpace - Return true if the specified tag is DW_TAG_namespace. More... | |
bool | isLexicalBlockFile () const |
bool | isLexicalBlock () const |
isLexicalBlock - Return true if the specified tag is DW_TAG_lexical_block. More... | |
bool | isSubrange () const |
isSubrange - Return true if the specified tag is DW_TAG_subrange_type. More... | |
bool | isEnumerator () const |
isEnumerator - Return true if the specified tag is DW_TAG_enumerator. More... | |
bool | isType () const |
isType - Return true if the specified tag is legal for DIType. More... | |
bool | isUnspecifiedParameter () const |
bool | isTemplateTypeParameter () const |
bool | isTemplateValueParameter () const |
bool | isObjCProperty () const |
isObjCProperty - Return true if the specified tag is DW_TAG_APPLE_property. More... | |
bool | isImportedEntity () const |
Return true if the specified tag is DW_TAG_imported_module or DW_TAG_imported_declaration. More... | |
void | print (raw_ostream &OS) const |
print - print descriptor. More... | |
void | dump () const |
dump - print descriptor to dbgs() with a newline. More... | |
Protected Member Functions | |
void | printInternal (raw_ostream &OS) const |
![]() | |
StringRef | getStringField (unsigned Elt) const |
unsigned | getUnsignedField (unsigned Elt) const |
uint64_t | getUInt64Field (unsigned Elt) const |
int64_t | getInt64Field (unsigned Elt) const |
DIDescriptor | getDescriptorField (unsigned Elt) const |
template<typename DescTy > | |
DescTy | getFieldAs (unsigned Elt) const |
GlobalVariable * | getGlobalVariableField (unsigned Elt) const |
Constant * | getConstantField (unsigned Elt) const |
Function * | getFunctionField (unsigned Elt) const |
void | replaceFunctionField (unsigned Elt, Function *F) |
template<> | |
DIScopeRef | getFieldAs (unsigned Elt) const |
Specialize getFieldAs to handle fields that are references to DIScopes. More... | |
template<> | |
DITypeRef | getFieldAs (unsigned Elt) const |
Specialize getFieldAs to handle fields that are references to DITypes. More... | |
template<> | |
DIScopeRef | getFieldAs (unsigned Elt) const |
Specialize getFieldAs to handle fields that are references to DIScopes. More... | |
template<> | |
DITypeRef | getFieldAs (unsigned Elt) const |
Specialize getFieldAs to handle fields that are references to DITypes. More... | |
Friends | |
class | DIDescriptor |
Additional Inherited Members | |
![]() | |
enum | { FlagPrivate = 1 << 0, FlagProtected = 1 << 1, FlagFwdDecl = 1 << 2, FlagAppleBlock = 1 << 3, FlagBlockByrefStruct = 1 << 4, FlagVirtual = 1 << 5, FlagArtificial = 1 << 6, FlagExplicit = 1 << 7, FlagPrototyped = 1 << 8, FlagObjcClassComplete = 1 << 9, FlagObjectPointer = 1 << 10, FlagVector = 1 << 11, FlagStaticMember = 1 << 12, FlagIndirectVariable = 1 << 13 } |
![]() | |
const MDNode * | DbgNode |
DIScope - A base class for various scopes.
Definition at line 197 of file DebugInfo.h.
|
inlineexplicit |
Definition at line 203 of file DebugInfo.h.
DIScopeRef DIScope::getContext | ( | ) | const |
Gets the parent scope for this scope node or returns a default constructed scope.
Definition at line 738 of file DebugInfo.cpp.
References llvm::DIType::getContext(), and llvm::dwarf::isType().
Referenced by llvm::CompileUnit::getParentContextString(), and isTypeUnitScoped().
StringRef DIScope::getDirectory | ( | ) | const |
Definition at line 779 of file DebugInfo.cpp.
References getNodeField(), and getStringField().
Referenced by llvm::CompileUnit::addSourceLine(), llvm::DILocation::getDirectory(), and llvm::jitprofiling::FilenameCache::getFullPath().
StringRef DIScope::getFilename | ( | ) | const |
Definition at line 773 of file DebugInfo.cpp.
References getNodeField(), and getStringField().
Referenced by llvm::CompileUnit::addSourceLine(), llvm::jitprofiling::FilenameCache::getFilename(), llvm::DILocation::getFilename(), llvm::jitprofiling::FilenameCache::getFullPath(), and printDebugLoc().
StringRef DIScope::getName | ( | ) | const |
If the scope node has a name, return that, else return an empty string.
Definition at line 760 of file DebugInfo.cpp.
References llvm::DIType::getName(), llvm::DISubprogram::getName(), llvm::DINameSpace::getName(), and llvm::dwarf::isType().
Referenced by llvm::CompileUnit::getParentContextString().
DIScopeRef DIScope::getRef | ( | ) | const |
Generate a reference to this DIScope. Uses the type identifier instead of the actual MDNode if possible, to help type uniquing.
Generate a reference to this DIType. Uses the type identifier instead of the actual MDNode if possible, to help type uniquing.
Definition at line 676 of file DebugInfo.cpp.
References llvm::DICompositeType::getIdentifier().
Referenced by llvm::DIBuilder::createArrayType(), llvm::DIBuilder::createClassType(), llvm::DIBuilder::createEnumerationType(), llvm::DIBuilder::createForwardDecl(), llvm::DIBuilder::createFriend(), llvm::DIBuilder::createFunction(), llvm::DIBuilder::createInheritance(), llvm::DIBuilder::createMemberPointerType(), llvm::DIBuilder::createMemberType(), llvm::DIBuilder::createMethod(), llvm::DIBuilder::createPointerType(), llvm::DIBuilder::createQualifiedType(), llvm::DIBuilder::createReferenceType(), llvm::DIBuilder::createStaticMemberType(), llvm::DIBuilder::createStructType(), llvm::DIBuilder::createTemplateTypeParameter(), llvm::DIBuilder::createTypedef(), llvm::DIBuilder::createUnionType(), llvm::DIBuilder::createVectorType(), and llvm::DICompositeType::setContainingType().
|
protected |
Definition at line 1245 of file DebugInfo.cpp.
Referenced by llvm::DIDescriptor::print().
|
friend |
Definition at line 199 of file DebugInfo.h.