[Lldb-commits] [lldb] 212f714 - [lldb] add missed handling for new BTFTagAttributed type

Yonghong Song via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 16 11:06:01 PDT 2022


Author: Yonghong Song
Date: 2022-03-16T11:00:35-07:00
New Revision: 212f714ff75e2869b051ff381ceb9a16b994adad

URL: https://github.com/llvm/llvm-project/commit/212f714ff75e2869b051ff381ceb9a16b994adad
DIFF: https://github.com/llvm/llvm-project/commit/212f714ff75e2869b051ff381ceb9a16b994adad.diff

LOG: [lldb] add missed handling for new BTFTagAttributed type

Commit 3251ba2d0fcf ("[Attr] Fix a btf_type_tag AST generation")
added a new type BTFTagAttributedType to the clang AST type
system. There are a few places in lldb needed to handle this type
similar to Attributed type to avoid compilation warning/error
when 'switch' is used to enumerate all types.

Added: 
    

Modified: 
    lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index caf9211ea850e..2d5bd02febe54 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -4172,6 +4172,7 @@ TypeSystemClang::GetTypeClass(lldb::opaque_compiler_type_t type) {
     break;
 
   case clang::Type::Attributed:
+  case clang::Type::BTFTagAttributed:
     break;
   case clang::Type::TemplateTypeParm:
     break;
@@ -5097,6 +5098,7 @@ lldb::Encoding TypeSystemClang::GetEncoding(lldb::opaque_compiler_type_t type,
   case clang::Type::DependentSizedExtVector:
   case clang::Type::UnresolvedUsing:
   case clang::Type::Attributed:
+  case clang::Type::BTFTagAttributed:
   case clang::Type::TemplateTypeParm:
   case clang::Type::SubstTemplateTypeParm:
   case clang::Type::SubstTemplateTypeParmPack:
@@ -5250,6 +5252,7 @@ lldb::Format TypeSystemClang::GetFormat(lldb::opaque_compiler_type_t type) {
   case clang::Type::DependentSizedExtVector:
   case clang::Type::UnresolvedUsing:
   case clang::Type::Attributed:
+  case clang::Type::BTFTagAttributed:
   case clang::Type::TemplateTypeParm:
   case clang::Type::SubstTemplateTypeParm:
   case clang::Type::SubstTemplateTypeParmPack:


        


More information about the lldb-commits mailing list