diff options
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index d75210d0723..c0c93506ddb 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/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; } |