R600: Fix function name printing in LowerCall

v2: Check both ExternalSymbol and GlobalAddress

Patch by: Jan Vesely <jan.vesely@rutgers.edu>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207282 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matt Arsenault 2014-04-25 22:22:01 +00:00
parent 82a35bf01a
commit d1f361aa39

View File

@ -362,7 +362,9 @@ SDValue AMDGPUTargetLowering::LowerCall(CallLoweringInfo &CLI,
StringRef FuncName("<unknown>");
if (const GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee))
if (const ExternalSymbolSDNode *G = dyn_cast<ExternalSymbolSDNode>(Callee))
FuncName = G->getSymbol();
else if (const GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee))
FuncName = G->getGlobal()->getName();
DiagnosticInfoUnsupported NoCalls(Fn, "call to function " + FuncName);