diff options
author | Devang Patel <dpatel@apple.com> | 2010-07-13 16:23:13 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-07-13 16:23:13 +0000 |
commit | 2ecebc2232d73efa80dd65bb176053f98899d069 (patch) | |
tree | e5b4a27ef2f842ce6ed1a2e33553ec1ddca6396f /lib/CodeGen/CGDebugInfo.cpp | |
parent | e4b8f1171d699c56ba2b39aabf1d7cb4c38ce4f8 (diff) |
Add volatile qualifiers for "this".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108245 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index a3c4003ff5..4e158955f8 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -537,11 +537,17 @@ CGDebugInfo::getOrCreateMethodType(const CXXMethodDecl *Method, llvm::DIType ThisPtrType = DebugFactory.CreateArtificialType(getOrCreateType(ThisPtr, Unit)); - if (Method->getTypeQualifiers() && Qualifiers::Const) + unsigned Quals = Method->getTypeQualifiers(); + if (Quals & Qualifiers::Const) ThisPtrType = DebugFactory.CreateDerivedType(llvm::dwarf::DW_TAG_const_type, Unit, "", Unit, 0, 0, 0, 0, 0, ThisPtrType); + if (Quals & Qualifiers::Volatile) + ThisPtrType = + DebugFactory.CreateDerivedType(llvm::dwarf::DW_TAG_volatile_type, + Unit, "", Unit, + 0, 0, 0, 0, 0, ThisPtrType); TypeCache[ThisPtr.getAsOpaquePtr()] = ThisPtrType; Elts.push_back(ThisPtrType); |