summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/CodeGen/GlobalDecl.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen/GlobalDecl.h')
-rw-r--r--contrib/llvm/tools/clang/lib/CodeGen/GlobalDecl.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/GlobalDecl.h b/contrib/llvm/tools/clang/lib/CodeGen/GlobalDecl.h
index b8a98d7..26dea40 100644
--- a/contrib/llvm/tools/clang/lib/CodeGen/GlobalDecl.h
+++ b/contrib/llvm/tools/clang/lib/CodeGen/GlobalDecl.h
@@ -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 {
OpenPOWER on IntegriCloud