diff options
Diffstat (limited to 'llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp index 636b1c413db..322122a28b4 100644 --- a/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp @@ -427,7 +427,9 @@ void Printer::printOp(const MachineOperand &MO,      return;    case MachineOperand::MO_GlobalAddress:      if (!elideOffsetKeyword) { -      if (isa<Function>(MO.getGlobal())) { +      // Dynamically-resolved functions need a stub for the function +      Function *F = dyn_cast<Function>(MO.getGlobal()); +      if (F && F->isExternal()) {          Stubs.insert(Mang->getValueName(MO.getGlobal()));          O << "L" << Mang->getValueName(MO.getGlobal()) << "$stub";        } else { | 

