summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-09 23:19:15 +0000
committerChris Lattner <sabre@nondot.org>2010-03-09 23:19:15 +0000
commit1b6d60d1c031e05257ecb3e2b7a8c542514b206b (patch)
treebe2cec7547da5735c54c85a8c225169af6ba0cea /llvm/lib/CodeGen
parentaab52840afba1ede5d8c28ec6ff26556b1763860 (diff)
downloadbcm5719-llvm-1b6d60d1c031e05257ecb3e2b7a8c542514b206b.tar.gz
bcm5719-llvm-1b6d60d1c031e05257ecb3e2b7a8c542514b206b.zip
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
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
index 1f1ac526986..b255a177973 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud