[llvm-commits] [llvm] r98101 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp

Chris Lattner sabre at nondot.org
Tue Mar 9 15:19:16 PST 2010


Author: lattner
Date: Tue Mar  9 17:19:15 2010
New Revision: 98101

URL: http://llvm.org/viewvc/llvm-project?rev=98101&view=rev
Log:
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".

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp?rev=98101&r1=98100&r2=98101&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp Tue Mar  9 17:19:15 2010
@@ -213,6 +213,14 @@
 ///
 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();





More information about the llvm-commits mailing list