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 | 769640e30d1e8ec2a6667daff1c2d0a28811138b (patch) | |
tree | 7707c771b3399f414808a53f2a70f4fd362b3062 /lib/CodeGen/CGDebugInfo.cpp | |
parent | 8dd0c5626455cdf94280783e85e413eed6cbf3d9 (diff) |
const qualify debug info for "this" for const methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108220 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 80d5f1af5e..a3c4003ff5 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/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); |