LLVM API Documentation

Public Member Functions | Protected Member Functions | Friends
llvm::DIScope Class Reference

#include <DebugInfo.h>

Inheritance diagram for llvm::DIScope:
Inheritance graph
[legend]
Collaboration diagram for llvm::DIScope:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

llvm::DIScope::DIScope ( const MDNode N = nullptr) [inline, explicit]

Definition at line 227 of file DebugInfo.h.

References N.


Member Function Documentation

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().

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().

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().


Friends And Related Function Documentation

friend class DIDescriptor [friend]

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