aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-06-22 16:00:14 +0000
committerAnders Carlsson <andersca@mac.com>2010-06-22 16:00:14 +0000
commitdc5daec0d30959bf081544f72d378f6f96cf9b1a (patch)
tree2bb46a7bd6efe68aa3773cca46c53698dd3679c8 /lib
parent0e5abbe065ab7fb9e3b03b4d25fac3f2dd4b2389 (diff)
Add GlobalDecl::getCanonicalDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106546 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/GlobalDecl.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/CodeGen/GlobalDecl.h b/lib/CodeGen/GlobalDecl.h
index b8a98d7c03..26dea402f4 100644
--- a/lib/CodeGen/GlobalDecl.h
+++ b/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 {