mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Debug Info: code clean up.
Use EmitLabelOffsetDifference for handling on darwin platform when non-darwin platforms use EmitLabelPlusOffset. Also fix a bug in EmitLabelOffsetDifference where the size is hard-coded to 4 even though Size is passed in as an argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193660 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1423,12 +1423,12 @@ void AsmPrinter::EmitLabelOffsetDifference(const MCSymbol *Hi, uint64_t Offset,
|
|||||||
OutContext);
|
OutContext);
|
||||||
|
|
||||||
if (!MAI->hasSetDirective())
|
if (!MAI->hasSetDirective())
|
||||||
OutStreamer.EmitValue(Diff, 4);
|
OutStreamer.EmitValue(Diff, Size);
|
||||||
else {
|
else {
|
||||||
// Otherwise, emit with .set (aka assignment).
|
// Otherwise, emit with .set (aka assignment).
|
||||||
MCSymbol *SetLabel = GetTempSymbol("set", SetCounter++);
|
MCSymbol *SetLabel = GetTempSymbol("set", SetCounter++);
|
||||||
OutStreamer.EmitAssignment(SetLabel, Diff);
|
OutStreamer.EmitAssignment(SetLabel, Diff);
|
||||||
OutStreamer.EmitSymbolValue(SetLabel, 4);
|
OutStreamer.EmitSymbolValue(SetLabel, Size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2082,7 +2082,9 @@ void DwarfDebug::emitDIE(DIE *Die, std::vector<DIEAbbrev *> *Abbrevs) {
|
|||||||
Asm->EmitLabelPlusOffset(DwarfInfoSectionSym, Addr,
|
Asm->EmitLabelPlusOffset(DwarfInfoSectionSym, Addr,
|
||||||
DIEEntry::getRefAddrSize(Asm));
|
DIEEntry::getRefAddrSize(Asm));
|
||||||
else
|
else
|
||||||
Asm->OutStreamer.EmitIntValue(Addr, DIEEntry::getRefAddrSize(Asm));
|
Asm->EmitLabelOffsetDifference(DwarfInfoSectionSym, Addr,
|
||||||
|
DwarfInfoSectionSym,
|
||||||
|
DIEEntry::getRefAddrSize(Asm));
|
||||||
} else {
|
} else {
|
||||||
Asm->EmitInt32(Addr);
|
Asm->EmitInt32(Addr);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user