diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-12-09 10:27:32 +0100 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-12-09 10:46:26 +0100 |
commit | d0fb7a478df19b78b58bf8778e9f046903115035 (patch) | |
tree | efcf185c3887eecd37c460fe9cb7ed4e2c16a828 /lldb/source/Symbol/ClangASTContext.cpp | |
parent | f3696533f2246653774f85f49269f5059fb3fe65 (diff) | |
download | bcm5719-llvm-d0fb7a478df19b78b58bf8778e9f046903115035.tar.gz bcm5719-llvm-d0fb7a478df19b78b58bf8778e9f046903115035.zip |
[lldb] Support for DWARF-5 atomic types
Summary:
This patch adds support for atomic types (DW_TAG_atomic_type) to LLDB. It's mostly just filling out all the switch-statements that didn't implement Atomic case with the usual boilerplate.
Thanks Pavel for writing the test case.
Reviewers: labath, aprantl, shafik
Reviewed By: labath
Subscribers: jfb, abidh, JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71183
Diffstat (limited to 'lldb/source/Symbol/ClangASTContext.cpp')
-rw-r--r-- | lldb/source/Symbol/ClangASTContext.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index cf7f2caa51d..b765dfb3df3 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -4066,6 +4066,11 @@ ClangASTContext::GetTypeInfo(lldb::opaque_compiler_type_t type, ->getUnderlyingType() .getAsOpaquePtr()) .GetTypeInfo(pointee_or_element_clang_type); + case clang::Type::Atomic: + return CompilerType(this, llvm::cast<clang::AtomicType>(qual_type) + ->getValueType() + .getAsOpaquePtr()) + .GetTypeInfo(pointee_or_element_clang_type); case clang::Type::UnresolvedUsing: return 0; @@ -4760,6 +4765,13 @@ ClangASTContext::GetRValueReferenceType(lldb::opaque_compiler_type_t type) { return CompilerType(); } +CompilerType ClangASTContext::GetAtomicType(lldb::opaque_compiler_type_t type) { + if (!type) + return CompilerType(); + return CompilerType( + this, getASTContext()->getAtomicType(GetQualType(type)).getAsOpaquePtr()); +} + CompilerType ClangASTContext::AddConstModifier(lldb::opaque_compiler_type_t type) { if (type) { @@ -5364,6 +5376,11 @@ lldb::Format ClangASTContext::GetFormat(lldb::opaque_compiler_type_t type) { ->getUnderlyingType() .getAsOpaquePtr()) .GetFormat(); + case clang::Type::Atomic: + return CompilerType(this, llvm::cast<clang::AtomicType>(qual_type) + ->getValueType() + .getAsOpaquePtr()) + .GetFormat(); case clang::Type::DependentSizedArray: case clang::Type::DependentSizedExtVector: case clang::Type::UnresolvedUsing: @@ -5379,7 +5396,6 @@ lldb::Format ClangASTContext::GetFormat(lldb::opaque_compiler_type_t type) { case clang::Type::TemplateSpecialization: case clang::Type::DeducedTemplateSpecialization: - case clang::Type::Atomic: case clang::Type::Adjusted: case clang::Type::Pipe: break; |