///
void DIELabel::EmitValue(DwarfPrinter *D, unsigned Form) const {
bool IsSmall = Form == dwarf::DW_FORM_data4;
- D->EmitReference(Label, false, IsSmall);
+ unsigned Size = IsSmall ? 4 : D->getTargetData()->getPointerSize();
+ D->getAsm()->OutStreamer.EmitSymbolValue(Label, Size, 0/*AddrSpace*/);
}
/// SizeOf - Determine size of label value in bytes.
Asm->EmitInt8(dwarf::DW_LNE_set_address);
Asm->OutStreamer.AddComment("Section end label");
- EmitReference(getDWLabel("section_end", SectionEnd));
+
+ Asm->OutStreamer.EmitSymbolValue(getDWLabel("section_end", SectionEnd),
+ TD->getPointerSize(), 0/*AddrSpace*/);
// Mark end of matrix.
Asm->OutStreamer.AddComment("DW_LNE_end_sequence");
Asm->EmitInt8(dwarf::DW_LNE_set_address);
Asm->OutStreamer.AddComment("Location label");
- EmitReference(getDWLabel("label", LabelID));
-
+ Asm->OutStreamer.EmitSymbolValue(getDWLabel("label", LabelID),
+ TD->getPointerSize(), 0/*AddrSpace*/);
+
// If change of source, then switch to the new source.
if (Source != LineInfo.getSourceID()) {
Source = LineInfo.getSourceID();
getTempLabel("section_debug_frame"), true, false);
Asm->OutStreamer.AddComment("FDE initial location");
- EmitReference(getDWLabel("func_begin", DebugFrameInfo.Number));
+ Asm->OutStreamer.EmitSymbolValue(getDWLabel("func_begin",
+ DebugFrameInfo.Number),
+ TD->getPointerSize(), 0/*AddrSpace*/);
+
+
+
Asm->OutStreamer.AddComment("FDE address range");
EmitDifference(getDWLabel("func_end", DebugFrameInfo.Number),
getDWLabel("func_begin", DebugFrameInfo.Number));
}
-/// EmitReference - Emit a reference to a label.
-///
-void DwarfPrinter::EmitReference(const MCSymbol *Sym, bool IsPCRelative,
- bool Force32Bit) const {
- unsigned Size = Force32Bit ? 4 : TD->getPointerSize();
-
- if (!IsPCRelative) {
- Asm->OutStreamer.EmitSymbolValue(Sym, Size, 0/*AddrSpace*/);
- return;
- }
-
- // FIXME: Need an MCExpr for ".".
- // FIXME: MCize.
- if (Force32Bit || TD->getPointerSize() == sizeof(int32_t))
- O << MAI->getData32bitsDirective();
- else
- O << MAI->getData64bitsDirective();
- O << *Sym;
- if (IsPCRelative) O << "-" << MAI->getPCSymbol();
-}
-
void DwarfPrinter::EmitReference(const MCSymbol *Sym, unsigned Encoding) const {
const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
/// EmitReference - Emit a reference to a label.
///
- void EmitReference(const MCSymbol *Label, bool IsPCRelative = false,
- bool Force32Bit = false) const;
-
void EmitReference(const MCSymbol *Sym, unsigned Encoding) const;
void EmitReference(const GlobalValue *GV, unsigned Encoding) const;