[Lldb-commits] [lldb] [lldb] Fix DWARFASTParserClang formatting (PR #205857)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 25 09:45:49 PDT 2026
https://github.com/JDevlieghere created https://github.com/llvm/llvm-project/pull/205857
In #205701, I applied Michael's suggestion and enabled auto-merge. Despite the formatter check failing, the change still got merged. Fix the formatting and another inconsistency in the use of braces.
>From 7f3991ae8761a222aa327f44a87b90e45e531208 Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <jonas at devlieghere.com>
Date: Thu, 25 Jun 2026 09:42:03 -0700
Subject: [PATCH] [lldb] Fix DWARFASTParserClang formatting
In #205701, I applied Michael's suggestion and enabled auto-merge.
Despite the formatter check failing, the change still got merged. Fix
the formatting and another inconsistency in the use of braces.
---
.../SymbolFile/DWARF/DWARFASTParserClang.cpp | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index f4d3f87331a88..0506b7d4da40f 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -2489,20 +2489,21 @@ Function *DWARFASTParserClang::ParseFunctionFromDWARF(
} else if (mangled) {
func_name.SetValue(ConstString(mangled));
} else if ((die.GetParent().Tag() == DW_TAG_compile_unit ||
- die.GetParent().Tag() == DW_TAG_partial_unit) &&
- Language::LanguageIsCPlusPlus(
- SymbolFileDWARF::GetLanguage(*die.GetCU())) &&
- !Language::LanguageIsObjC(
- SymbolFileDWARF::GetLanguage(*die.GetCU())) &&
- name && strcmp(name, "main") != 0) {
+ die.GetParent().Tag() == DW_TAG_partial_unit) &&
+ Language::LanguageIsCPlusPlus(
+ SymbolFileDWARF::GetLanguage(*die.GetCU())) &&
+ !Language::LanguageIsObjC(
+ SymbolFileDWARF::GetLanguage(*die.GetCU())) &&
+ name && strcmp(name, "main") != 0) {
// If the mangled name is not present in the DWARF, generate the
// demangled name using the decl context. We skip if the function is
// "main" as its name is never mangled.
func_name.SetDemangledName(ConstructDemangledNameFromDWARF(die));
// Ensure symbol is preserved (as the mangled name).
func_name.SetMangledName(ConstString(name));
- } else
+ } else {
func_name.SetValue(ConstString(name));
+ }
FunctionSP func_sp;
More information about the lldb-commits
mailing list