summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/GlobalDecl.h
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
commit16d9f1788e70aea775e3a7c832ac1695776618fc (patch)
tree6e0934188db920ed53871c9d2094331d7b00dac0 /clang/lib/CodeGen/GlobalDecl.h
parenteb9165c08f84d3c170fdd92f320042656a61d0dc (diff)
downloadbcm5719-llvm-16d9f1788e70aea775e3a7c832ac1695776618fc.tar.gz
bcm5719-llvm-16d9f1788e70aea775e3a7c832ac1695776618fc.zip
Add GlobalDecl::getCanonicalDecl.
llvm-svn: 106546
Diffstat (limited to 'clang/lib/CodeGen/GlobalDecl.h')
-rw-r--r--clang/lib/CodeGen/GlobalDecl.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/GlobalDecl.h b/clang/lib/CodeGen/GlobalDecl.h
index b8a98d7c03b..26dea402f4b 100644
--- a/clang/lib/CodeGen/GlobalDecl.h
+++ b/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