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 | 01c8c100c26973faf5e19bd38a029e58f0dbae8d (patch) | |
tree | 355b364b5bcaab35e28190219c5a47a05cb85a79 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | f39cf26cb5082ee77855134caded822d8c5eeaa8 (diff) | |
download | bcm5719-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.cpp | 8 |
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); |