diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-25 21:28:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-25 21:28:50 +0000 |
commit | 718fb59801320b8cb22363d115b5fc5ec40dc1f5 (patch) | |
tree | 1f25cb27165c396ec8c6dc1bfe7733f59c0c7af5 /lib/CodeGen | |
parent | 0988639963747a29fccf1273bbec996b4bac89a8 (diff) |
mcstreamerize gprel32 emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94452 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index d75210d072..c0c93506dd 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -544,8 +544,9 @@ void AsmPrinter::printPICJumpTableEntry(const MachineJumpTableInfo *MJTI, const MachineBasicBlock *MBB, unsigned uid) const { // If the target supports GPRel, use it. - if (const char *GPRel32Dir = MAI->getGPRel32Directive()) { - O << GPRel32Dir << *GetMBBSymbol(MBB->getNumber()) << '\n'; + if (MAI->getGPRel32Directive() != 0) { + MCSymbol *MBBSym = GetMBBSymbol(MBB->getNumber()); + OutStreamer.EmitGPRel32Value(MCSymbolRefExpr::Create(MBBSym, OutContext)); return; } |