summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-07-13 00:24:30 +0000
committerDevang Patel <dpatel@apple.com>2010-07-13 00:24:30 +0000
commit0a34e31d8117df0ac232773e82ed6f185c476f2a (patch)
tree842186b0093da47165d570b338e93059f61a8683 /clang/lib/CodeGen/CGDebugInfo.cpp
parent54e620d2c77875f55ee6eca665eac040c21055eb (diff)
downloadbcm5719-llvm-0a34e31d8117df0ac232773e82ed6f185c476f2a.tar.gz
bcm5719-llvm-0a34e31d8117df0ac232773e82ed6f185c476f2a.zip
const qualify debug info for "this" for const methods.
llvm-svn: 108220
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 80d5f1af5e4..a3c4003ff5b 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -536,6 +536,13 @@ CGDebugInfo::getOrCreateMethodType(const CXXMethodDecl *Method,
Context.getPointerType(Context.getTagDeclType(Method->getParent()));
llvm::DIType ThisPtrType =
DebugFactory.CreateArtificialType(getOrCreateType(ThisPtr, Unit));
+
+ if (Method->getTypeQualifiers() && Qualifiers::Const)
+ ThisPtrType =
+ DebugFactory.CreateDerivedType(llvm::dwarf::DW_TAG_const_type,
+ Unit, "", Unit,
+ 0, 0, 0, 0, 0, ThisPtrType);
+
TypeCache[ThisPtr.getAsOpaquePtr()] = ThisPtrType;
Elts.push_back(ThisPtrType);
OpenPOWER on IntegriCloud