summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-07-13 16:23:13 +0000
committerDevang Patel <dpatel@apple.com>2010-07-13 16:23:13 +0000
commit01c8c100c26973faf5e19bd38a029e58f0dbae8d (patch)
tree355b364b5bcaab35e28190219c5a47a05cb85a79 /clang/lib/CodeGen/CGDebugInfo.cpp
parentf39cf26cb5082ee77855134caded822d8c5eeaa8 (diff)
downloadbcm5719-llvm-01c8c100c26973faf5e19bd38a029e58f0dbae8d.tar.gz
bcm5719-llvm-01c8c100c26973faf5e19bd38a029e58f0dbae8d.zip
Add volatile qualifiers for "this".
llvm-svn: 108245
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index a3c4003ff5b..4e158955f89 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud