Skip to content

Commit a4dc724

Browse files
committed
Make debugging great again.
Regarding the OutStreamer->finish() removal: This fixes the "error: symbol '.Lline_table_start0' is already defined" error that we had for a while (probably a bad rebase). OutStreamer->finish() emits the debug line table (and its line_table_start0 label). The second finish runs again and tries to define the same label, which triggers the “already defined” error.
1 parent fb2b221 commit a4dc724

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,8 +2385,6 @@ bool AsmPrinter::doFinalization(Module &M) {
23852385
}
23862386
}
23872387

2388-
OutStreamer->finish();
2389-
23902388
// Allow the target to emit any magic that it wants at the end of the file,
23912389
// after everything else has gone out.
23922390
emitEndOfAsmFile(M);

llvm/lib/Target/Z80/MCTargetDesc/Z80MCAsmInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Z80MCAsmInfoELF::Z80MCAsmInfoELF(const Triple &T) {
4343
AssemblerDialect = !Is16Bit;
4444
HasFunctionAlignment = false;
4545
ExceptionsType = ExceptionHandling::SjLj;
46+
SupportsDebugInformation = SupportsCFI = true;
4647

4748
if (Z80GasStyle) {
4849
Code16Directive = ".assume\tADL = 0";
@@ -88,7 +89,6 @@ Z80MCAsmInfoELF::Z80MCAsmInfoELF(const Triple &T) {
8889
WeakDirective = "\tweak\t";
8990
UseLogicalShr = false;
9091
HasSingleParameterDotFile = false;
91-
SupportsDebugInformation = SupportsCFI = true;
9292
DwarfFileDirective = "\tfile\t";
9393
DwarfLocDirective = "\tloc\t";
9494
DwarfCFIDirectivePrefix = "\tcfi_";

0 commit comments

Comments
 (0)