[llvm] 4080328 - DwarfDebug: Minor condition cleanups
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 29 14:02:13 PDT 2023
Author: David Blaikie
Date: 2023-03-29T21:01:38Z
New Revision: 40803282b788e1c6f8e035c5359420954b275355
URL: https://github.com/llvm/llvm-project/commit/40803282b788e1c6f8e035c5359420954b275355
DIFF: https://github.com/llvm/llvm-project/commit/40803282b788e1c6f8e035c5359420954b275355.diff
LOG: DwarfDebug: Minor condition cleanups
Sink/share a few common conditions.
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 4fc2a27e8fe55..82af9e26fdc86 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1050,11 +1050,11 @@ void DwarfDebug::finishUnitAttributes(const DICompileUnit *DIUnit,
if (!SDK.empty())
NewCU.addString(Die, dwarf::DW_AT_APPLE_sdk, SDK);
- // Add DW_str_offsets_base to the unit DIE, except for split units.
- if (useSegmentedStringOffsetsTable() && !useSplitDwarf())
- NewCU.addStringOffsetsStart();
-
if (!useSplitDwarf()) {
+ // Add DW_str_offsets_base to the unit DIE, except for split units.
+ if (useSegmentedStringOffsetsTable())
+ NewCU.addStringOffsetsStart();
+
NewCU.initStmtList();
// If we're using split dwarf the compilation dir is going to be in the
@@ -1377,11 +1377,10 @@ void DwarfDebug::finalizeModuleInfo() {
if (U.hasRangeLists())
U.addRnglistsBase();
- if (!DebugLocs.getLists().empty()) {
- if (!useSplitDwarf())
- U.addSectionLabel(U.getUnitDie(), dwarf::DW_AT_loclists_base,
- DebugLocs.getSym(),
- TLOF.getDwarfLoclistsSection()->getBeginSymbol());
+ if (!DebugLocs.getLists().empty() && !useSplitDwarf()) {
+ U.addSectionLabel(U.getUnitDie(), dwarf::DW_AT_loclists_base,
+ DebugLocs.getSym(),
+ TLOF.getDwarfLoclistsSection()->getBeginSymbol());
}
}
More information about the llvm-commits
mailing list