lldb simplified template names rebuild without clang ast by dwblaikie · Pull Request #90008 · llvm/llvm-project (original) (raw)

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:

git-clang-format --diff 396cdabe47f3596464b289d0937c0066f50a0ac6 9a654b056d9c05c0aa4856db161c1f1b08b9dfe9 -- lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp llvm/include/llvm-c/Error.h llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h llvm/include/llvm/DebugInfo/DWARF/DWARFTypePrinter.h llvm/lib/DebugInfo/DWARF/DWARFDie.cpp llvm/lib/DebugInfo/DWARF/DWARFTypePrinter.cpp

View the diff from clang-format here.

diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index 962844af28..1232f29e36 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===//

+#include #include #include -#include

#include "DWARFASTParser.h" #include "DWARFASTParserClang.h" @@ -1569,7 +1569,8 @@ DWARFASTParserClang::GetCPlusPlusQualifiedName(const DWARFDIE &die) { if (!name) return ""; static int indent = 0;

} diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h index 6a5ef1f83a..10c946a292 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h @@ -87,9 +87,7 @@ public:

// Accessing information about a DIE dw_tag_t Tag() const;

@@ -103,9 +101,7 @@ public: lldb::user_id_t GetID() const;

const char *GetName() const;

diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp index 064c510eea..eb8147e01c 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp @@ -532,9 +532,7 @@ llvm::iterator_rangeDWARFDIE::child_iterator DWARFDIE::children() const { DWARFDIE::child_iterator DWARFDIE::begin() const { return child_iterator(*this); } -DWARFDIE::child_iterator DWARFDIE::end() const {

-inline const char* toString(DWARFFormValue Value, const char* Default) {

namespace detail { -template +template DieType resolveReferencedType(DieType D,

} template DieType resolveReferencedType(DieType D, typename DieType::DWARFFormValue F) { @@ -204,7 +208,8 @@ DieType DWARFTypePrinter::appendUnqualifiedNameBefore( OS << '('; else if (Word) OS << ' ';

@@ -275,7 +280,8 @@ DieType DWARFTypePrinter::appendUnqualifiedNameBefore( }

template -void DWARFTypePrinter::appendAndTerminateTemplateParameters(DieType D) { +void DWARFTypePrinter::appendAndTerminateTemplateParameters(

if (!appendTemplateParameters(D)) return;

@@ -354,8 +360,11 @@ void DWARFTypePrinter::appendUnqualifiedNameAfter( llvm::raw_string_ostream PtrauthStream(PtrauthString); PtrauthStream << "__ptrauth(" << getValOrNull(dwarf::DW_AT_LLVM_ptrauth_key) << ", "

@@ -573,8 +582,8 @@ void DWARFTypePrinter::appendConstVolatileQualifierAfter(DieType N) { DieType T; decomposeConstVolatile(N, T, C, V); if (T && T.getTag() == dwarf::DW_TAG_subroutine_type)

@@ -752,7 +762,7 @@ void DWARFTypePrinter::appendScopes(DieType D) { return; if (D.getTag() == dwarf::DW_TAG_lexical_block) return;