File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1727,11 +1727,12 @@ void BinaryContext::preprocessDebugInfo() {
1727
1727
StringRef GlobalPrefix = AsmInfo->getPrivateGlobalPrefix ();
1728
1728
for (const std::unique_ptr<DWARFUnit> &CU : DwCtx->compile_units ()) {
1729
1729
const uint64_t CUID = CU->getOffset ();
1730
+ std::optional<uint64_t > DWOID = CU->getDWOId ();
1730
1731
DwarfLineTable &BinaryLineTable = getDwarfLineTable (CUID);
1731
1732
BinaryLineTable.setLabel (Ctx->getOrCreateSymbol (
1732
1733
GlobalPrefix + " line_table_start" + Twine (CUID)));
1733
1734
1734
- if (!ProcessedCUs.count (CU.get ()))
1735
+ if (!ProcessedCUs.count (CU.get ()) || (DWOID && *DWOID == 0 ) )
1735
1736
continue ;
1736
1737
1737
1738
const DWARFDebugLine::LineTable *LineTable =
@@ -1746,7 +1747,7 @@ void BinaryContext::preprocessDebugInfo() {
1746
1747
Checksum = LineTable->Prologue .FileNames [0 ].Checksum ;
1747
1748
std::optional<const char *> Name =
1748
1749
dwarf::toString (CU->getUnitDIE ().find (dwarf::DW_AT_name), nullptr );
1749
- if (std::optional< uint64_t > DWOID = CU-> getDWOId () ) {
1750
+ if (DWOID) {
1750
1751
auto Iter = DWOCUs.find (*DWOID);
1751
1752
if (Iter == DWOCUs.end ()) {
1752
1753
this ->errs () << " BOLT-ERROR: DWO CU was not found for " << Name
Original file line number Diff line number Diff line change 1
1
# RUN: rm -rf %t && mkdir -p %t
2
2
# RUN: %clang -O3 -g -gdwarf-5 -gsplit-dwarf -Wl,-q %p/Inputs/thinlto-split-dwarf-inlining.s -o %t/main.exe
3
- # RUN: llvm-bolt %t/main.exe -o %t/main.exe.bolt -update-debug-sections -comp-dir-override="./ " 2>&1 | FileCheck %s
3
+ # RUN: llvm-bolt %t/main.exe -o %t/main.exe.bolt -update-debug-sections -comp-dir-override="%t " 2>&1 | FileCheck %s
4
4
5
5
# CHECK-NOT: Assertion `RangeListsWritersByCU.count(*DWOId) == 0 && "RangeLists writer for DWO unit already exists."'
6
6
# CHECK: BOLT-WARNING: Found DWO file of ID 0:
7
-
You can’t perform that action at this time.
0 commit comments