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);
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);
(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) {