LLVM API Documentation
#include <DebugInfo.h>
Public Member Functions | |
DIScope (const MDNode *N=nullptr) | |
DIScopeRef | getContext () const |
StringRef | getName () const |
If the scope node has a name, return that, else return an empty string. | |
StringRef | getFilename () const |
StringRef | getDirectory () const |
DIScopeRef | getRef () const |
Protected Member Functions | |
void | printInternal (raw_ostream &OS) const |
Friends | |
class | DIDescriptor |
DIScope - A base class for various scopes.
Although, implementation-wise, DIScope is the parent class of most other DIxxx classes, including DIType and its descendants, most of DIScope's descendants are not a substitutable subtype of DIScope. The DIDescriptor::isScope() method only is true for DIScopes that are scopes in the strict lexical scope sense (DICompileUnit, DISubprogram, etc.), but not for, e.g., a DIType.
Definition at line 221 of file DebugInfo.h.
llvm::DIScope::DIScope | ( | const MDNode * | N = nullptr | ) | [inline, explicit] |
Definition at line 227 of file DebugInfo.h.
References N.
DIScopeRef DIScope::getContext | ( | ) | const |
Gets the parent scope for this scope node or returns a default constructed scope.
Reimplemented in llvm::DINameSpace, llvm::DILexicalBlockFile, llvm::DILexicalBlock, llvm::DISubprogram, and llvm::DIType.
Definition at line 770 of file DebugInfo.cpp.
References llvm::DIType::getContext(), and llvm::dwarf::isType().
Referenced by llvm::DwarfUnit::getParentContextString().
StringRef DIScope::getDirectory | ( | ) | const |
Definition at line 811 of file DebugInfo.cpp.
References getNodeField(), and getStringField().
Referenced by llvm::DwarfUnit::addSourceLine(), llvm::DILocation::getDirectory(), and llvm::jitprofiling::FilenameCache::getFullPath().
StringRef DIScope::getFilename | ( | ) | const |
Definition at line 805 of file DebugInfo.cpp.
References getNodeField(), and getStringField().
Referenced by llvm::DwarfUnit::addSourceLine(), llvm::jitprofiling::FilenameCache::getFilename(), llvm::DILocation::getFilename(), llvm::jitprofiling::FilenameCache::getFullPath(), llvm::DebugLoc::print(), and printDebugLoc().
StringRef DIScope::getName | ( | ) | const |
If the scope node has a name, return that, else return an empty string.
Reimplemented in llvm::DINameSpace, llvm::DISubprogram, and llvm::DIType.
Definition at line 792 of file DebugInfo.cpp.
References llvm::DIType::getName(), llvm::DISubprogram::getName(), llvm::DINameSpace::getName(), and llvm::dwarf::isType().
Referenced by llvm::DwarfUnit::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 708 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(), createFunctionHelper(), llvm::DIBuilder::createImportedDeclaration(), llvm::DIBuilder::createInheritance(), llvm::DIBuilder::createMemberPointerType(), llvm::DIBuilder::createMemberType(), llvm::DIBuilder::createMethod(), llvm::DIBuilder::createPointerType(), llvm::DIBuilder::createQualifiedType(), llvm::DIBuilder::createReferenceType(), llvm::DIBuilder::createReplaceableForwardDecl(), llvm::DIBuilder::createStaticMemberType(), llvm::DIBuilder::createStructType(), llvm::DIBuilder::createTemplateTypeParameter(), llvm::DIBuilder::createTypedef(), llvm::DIBuilder::createUnionType(), llvm::DIBuilder::createVectorType(), llvm::DwarfUnit::getOrCreateTypeDIE(), llvm::DIType::operator DITypeRef(), and llvm::DICompositeType::setContainingType().
void DIScope::printInternal | ( | raw_ostream & | OS | ) | const [protected] |
Reimplemented in llvm::DIType.
Definition at line 1307 of file DebugInfo.cpp.
Referenced by llvm::DIDescriptor::print().
friend class DIDescriptor [friend] |
Reimplemented in llvm::DINameSpace, llvm::DISubprogram, llvm::DICompileUnit, llvm::DIFile, llvm::DICompositeType, llvm::DIDerivedType, and llvm::DIType.
Definition at line 223 of file DebugInfo.h.