diff options
author | Devang Patel <dpatel@apple.com> | 2010-07-13 00:24:30 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-07-13 00:24:30 +0000 |
commit | 0a34e31d8117df0ac232773e82ed6f185c476f2a (patch) | |
tree | 842186b0093da47165d570b338e93059f61a8683 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 54e620d2c77875f55ee6eca665eac040c21055eb (diff) | |
download | bcm5719-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.cpp | 7 |
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); |