Add GlobalDecl::getCanonicalDecl.

llvm-svn: 106546
This commit is contained in:
Anders Carlsson 2010-06-22 16:00:14 +00:00
parent eb9165c08f
commit 16d9f1788e
1 changed files with 9 additions and 1 deletions

View File

@ -36,7 +36,7 @@ class GlobalDecl {
Value.setPointer(D);
}
public:
GlobalDecl() {}
@ -50,6 +50,14 @@ public:
GlobalDecl(const CXXDestructorDecl *D, CXXDtorType Type)
: Value(D, Type) {}
GlobalDecl getCanonicalDecl() const {
GlobalDecl CanonGD;
CanonGD.Value.setPointer(Value.getPointer()->getCanonicalDecl());
CanonGD.Value.setInt(Value.getInt());
return CanonGD;
}
const Decl *getDecl() const { return Value.getPointer(); }
CXXCtorType getCtorType() const {