aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp5
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;
}