Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 89eb5dc

Browse files
committed
Revert "DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded"
This reverts commit r201380 for now while we investigate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201389 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent f46135e commit 89eb5dc

File tree

4 files changed

+4
-30
lines changed

4 files changed

+4
-30
lines changed

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,9 @@ DwarfCompileUnit *DwarfDebug::constructDwarfCompileUnit(DICompileUnit DIUnit) {
756756
InfoHolder.addUnit(NewCU);
757757

758758
FileIDCUMap[NewCU->getUniqueID()] = 0;
759+
// Call this to emit a .file directive if it wasn't emitted for the source
760+
// file this CU comes from yet.
761+
getOrCreateSourceID(FN, CompilationDir, NewCU->getUniqueID());
759762

760763
NewCU->addString(Die, dwarf::DW_AT_producer, DIUnit.getProducer());
761764
NewCU->addUInt(Die, dwarf::DW_AT_language, dwarf::DW_FORM_data2,

lib/MC/MCObjectStreamer.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,7 @@ void MCObjectStreamer::EmitZeros(uint64_t NumBytes) {
379379
void MCObjectStreamer::FinishImpl() {
380380
// Dump out the dwarf file & directory tables and line tables.
381381
const MCSymbol *LineSectionSymbol = NULL;
382-
if (!getContext().getMCLineTableSymbols().empty() ||
383-
getContext().hasDwarfFiles())
382+
if (getContext().hasDwarfFiles())
384383
LineSectionSymbol = MCDwarfFileTable::Emit(this);
385384

386385
// If we are generating dwarf for assembly source files dump out the sections.

test/DebugInfo/X86/generate-odr-hash.ll

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,6 @@
125125
; CHECK: DW_TAG_member
126126
; CHECK-NEXT: DW_AT_name{{.*}}"a"
127127

128-
; CHECK-LABEL: .debug_line contents:
129-
; CHECK: Line table prologue
130-
; CHECK-NOT: file_names[
131-
; CHECK: file_names{{.*}} bar.h
132-
; CHECK: file_names{{.*}} bar.cpp
133-
; CHECK-NOT: file_names[
134-
; CHECK-LABEL: .debug_str contents:
135-
136128
; Use the unit size as a rough hash/identifier for the unit we're dealing with
137129
; it happens to be unambiguous at the moment, but it's hardly ideal.
138130
; CHECK-LABEL: .debug_pubtypes contents:

test/DebugInfo/empty.ll

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)