AMDGPU: Fix crash if called function is a bitcast
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 28 Jul 2015 18:29:14 +0000 (18:29 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 28 Jul 2015 18:29:14 +0000 (18:29 +0000)
commit7a1c02d1f701027c05e913d1d6654ed1dc3e990c
tree083d44eb1293ce27b0f8ca6556aad6122b457bd1
parent7d4d116067f9569c2969a4a3e22f7bb4bde4b7e5
AMDGPU: Fix crash if called function is a bitcast

getCalledFunction() is null, so this would crash. Replace
crash with an error on unsupported call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243461 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll [new file with mode: 0644]