[cfe-commits] r106546 - /cfe/trunk/lib/CodeGen/GlobalDecl.h
Anders Carlsson
andersca at mac.com
Tue Jun 22 09:00:14 PDT 2010
Author: andersca
Date: Tue Jun 22 11:00:14 2010
New Revision: 106546
URL: http://llvm.org/viewvc/llvm-project?rev=106546&view=rev
Log:
Add GlobalDecl::getCanonicalDecl.
Modified:
cfe/trunk/lib/CodeGen/GlobalDecl.h
Modified: cfe/trunk/lib/CodeGen/GlobalDecl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/GlobalDecl.h?rev=106546&r1=106545&r2=106546&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/GlobalDecl.h (original)
+++ cfe/trunk/lib/CodeGen/GlobalDecl.h Tue Jun 22 11:00:14 2010
@@ -36,7 +36,7 @@
Value.setPointer(D);
}
-
+
public:
GlobalDecl() {}
@@ -50,6 +50,14 @@
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 {
More information about the cfe-commits
mailing list