mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-11 00:39:36 +00:00
Make EmitDwarfSetLineAddr an static helper. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215718 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
305a51fec3
commit
4d15a2441b
@ -664,10 +664,6 @@ public:
|
||||
StringRef FileName);
|
||||
|
||||
virtual MCSymbol *getDwarfLineTableSymbol(unsigned CUID);
|
||||
|
||||
void EmitDwarfSetLineAddr(int64_t LineDelta, const MCSymbol *Label,
|
||||
int PointerSize);
|
||||
|
||||
virtual void EmitCompactUnwindEncoding(uint32_t CompactUnwindEncoding);
|
||||
virtual void EmitCFISections(bool EH, bool Debug);
|
||||
void EmitCFIStartProc(bool IsSimple);
|
||||
|
@ -275,12 +275,24 @@ static const MCExpr *buildSymbolDiff(MCObjectStreamer &OS, const MCSymbol *A,
|
||||
return AddrDelta;
|
||||
}
|
||||
|
||||
static void emitDwarfSetLineAddr(MCObjectStreamer &OS, int64_t LineDelta,
|
||||
const MCSymbol *Label, int PointerSize) {
|
||||
// emit the sequence to set the address
|
||||
OS.EmitIntValue(dwarf::DW_LNS_extended_op, 1);
|
||||
OS.EmitULEB128IntValue(PointerSize + 1);
|
||||
OS.EmitIntValue(dwarf::DW_LNE_set_address, 1);
|
||||
OS.EmitSymbolValue(Label, PointerSize);
|
||||
|
||||
// emit the sequence for the LineDelta (from 1) and a zero address delta.
|
||||
MCDwarfLineAddr::Emit(&OS, LineDelta, 0);
|
||||
}
|
||||
|
||||
void MCObjectStreamer::EmitDwarfAdvanceLineAddr(int64_t LineDelta,
|
||||
const MCSymbol *LastLabel,
|
||||
const MCSymbol *Label,
|
||||
unsigned PointerSize) {
|
||||
if (!LastLabel) {
|
||||
EmitDwarfSetLineAddr(LineDelta, Label, PointerSize);
|
||||
emitDwarfSetLineAddr(*this, LineDelta, Label, PointerSize);
|
||||
return;
|
||||
}
|
||||
const MCExpr *AddrDelta = buildSymbolDiff(*this, Label, LastLabel);
|
||||
|
@ -80,18 +80,6 @@ void MCStreamer::generateCompactUnwindEncodings(MCAsmBackend *MAB) {
|
||||
(MAB ? MAB->generateCompactUnwindEncoding(FI.Instructions) : 0);
|
||||
}
|
||||
|
||||
void MCStreamer::EmitDwarfSetLineAddr(int64_t LineDelta,
|
||||
const MCSymbol *Label, int PointerSize) {
|
||||
// emit the sequence to set the address
|
||||
EmitIntValue(dwarf::DW_LNS_extended_op, 1);
|
||||
EmitULEB128IntValue(PointerSize + 1);
|
||||
EmitIntValue(dwarf::DW_LNE_set_address, 1);
|
||||
EmitSymbolValue(Label, PointerSize);
|
||||
|
||||
// emit the sequence for the LineDelta (from 1) and a zero address delta.
|
||||
MCDwarfLineAddr::Emit(this, LineDelta, 0);
|
||||
}
|
||||
|
||||
/// EmitIntValue - Special case of EmitValue that avoids the client having to
|
||||
/// pass in a MCExpr for constant integers.
|
||||
void MCStreamer::EmitIntValue(uint64_t Value, unsigned Size) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user