diff options
| author | Anders Carlsson <andersca@mac.com> | 2010-06-22 16:00:14 +0000 |
|---|---|---|
| committer | Anders Carlsson <andersca@mac.com> | 2010-06-22 16:00:14 +0000 |
| commit | 16d9f1788e70aea775e3a7c832ac1695776618fc (patch) | |
| tree | 6e0934188db920ed53871c9d2094331d7b00dac0 | |
| parent | eb9165c08f84d3c170fdd92f320042656a61d0dc (diff) | |
| download | bcm5719-llvm-16d9f1788e70aea775e3a7c832ac1695776618fc.tar.gz bcm5719-llvm-16d9f1788e70aea775e3a7c832ac1695776618fc.zip | |
Add GlobalDecl::getCanonicalDecl.
llvm-svn: 106546
| -rw-r--r-- | clang/lib/CodeGen/GlobalDecl.h | 10 |
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 { |

