[Lldb-commits] [PATCH] D112564: [lldb] Add support for custom char8_t types with different name

Luís Ferreira via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 26 11:02:24 PDT 2021


ljmf00 created this revision.
ljmf00 added projects: LLDB, LLVM.
Herald added a subscriber: JDevlieghere.
ljmf00 requested review of this revision.
Herald added a subscriber: lldb-commits.

  Currently for UTF-16 and UTF-32 types that are recognized by the DWARF encoding
  tags without `char16_t` and `char32_t` names respectively are recognized, but
  other names different than `char8_t` are not. To support the same behaviour of
  the previous encodings, DWARF encoding tags should be taken to consideration
  before fallbacking into the type name.
  
  Signed-off-by: Luís Ferreira <contact at lsferreira.net>

Cross-referencing https://reviews.llvm.org/D66447


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112564

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


Index: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
===================================================================
--- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -5155,6 +5155,8 @@
     case clang::BuiltinType::UChar:
     case clang::BuiltinType::WChar_U:
       return lldb::eFormatChar;
+    case clang::BuiltinType::Char8:
+      return lldb::eFormatUnicode8;
     case clang::BuiltinType::Char16:
       return lldb::eFormatUnicode16;
     case clang::BuiltinType::Char32:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112564.382404.patch
Type: text/x-patch
Size: 573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211026/ea6bfdd0/attachment.bin>


More information about the lldb-commits mailing list