diff --git a/lib/Target/R600/AMDGPUISelLowering.cpp b/lib/Target/R600/AMDGPUISelLowering.cpp index 97107a58e71..015f0ae4d78 100644 --- a/lib/Target/R600/AMDGPUISelLowering.cpp +++ b/lib/Target/R600/AMDGPUISelLowering.cpp @@ -362,7 +362,9 @@ SDValue AMDGPUTargetLowering::LowerCall(CallLoweringInfo &CLI, StringRef FuncName(""); - if (const GlobalAddressSDNode *G = dyn_cast(Callee)) + if (const ExternalSymbolSDNode *G = dyn_cast(Callee)) + FuncName = G->getSymbol(); + else if (const GlobalAddressSDNode *G = dyn_cast(Callee)) FuncName = G->getGlobal()->getName(); DiagnosticInfoUnsupported NoCalls(Fn, "call to function " + FuncName);