Skip to content
Snippets Groups Projects
Commit 4560276c authored by Argyrios Kyrtzidis's avatar Argyrios Kyrtzidis
Browse files

Add Entity::getInternalDecl() to be used only on Entities that refer to internal

(in translation unit) declarations.

llvm-svn: 77533
parent bc6c64de
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,13 @@ public:
/// \brief Find the Decl that can be referred to by this entity.
Decl *getDecl(ASTContext &AST) const;
/// \brief If this Entity represents a declaration that is internal to its
/// translation unit, getInternalDecl() returns it.
Decl *getInternalDecl() const {
assert(isInternalToTU() && "This Entity is not internal!");
return Val.get<Decl *>();
}
/// \brief Get a printable name for debugging purpose.
std::string getPrintableName() const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment