diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-09 23:19:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-09 23:19:15 +0000 |
commit | fcdae492ea4fc66ba547da6f761c2dd96b67fc82 (patch) | |
tree | 4571c786004480168e99698dc619075ed7703b76 /lib/CodeGen/AsmPrinter | |
parent | 2e5dd9b7415e9586ab1f436a336c6e014169e48a (diff) | |
download | external_llvm-fcdae492ea4fc66ba547da6f761c2dd96b67fc82.zip external_llvm-fcdae492ea4fc66ba547da6f761c2dd96b67fc82.tar.gz external_llvm-fcdae492ea4fc66ba547da6f761c2dd96b67fc82.tar.bz2 |
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".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98101 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter')
-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 1f1ac52..b255a17 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(); |