diff options
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfPrinter.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp index 1f1ac52698..b255a17797 100644 --- a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp @@ -213,6 +213,14 @@ void DwarfPrinter::EmitULEB128(unsigned Value, const char *Desc, /// 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 ".". PrintRelDirective(Force32Bit); O << *Sym; if (IsPCRelative) O << "-" << MAI->getPCSymbol(); |