convert the non-"ispcrel" case of EmitReference to MC,

significant debug info testcases are now all going through
MCStreamer, though they print a lot of extraneous newlines to "O".

llvm-svn: 98101
This commit is contained in:
Chris Lattner 2010-03-09 23:19:15 +00:00
parent aab52840af
commit 1b6d60d1c0
1 changed files with 8 additions and 0 deletions

View File

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