mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
simplify code from previous commits (Thanks Duncan)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158999 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
43c3a4a7e7
commit
d845c34170
@ -66,13 +66,8 @@ static Function *getCalledFunction(const Value *V, bool LookThroughBitCast) {
|
||||
if (LookThroughBitCast)
|
||||
V = V->stripPointerCasts();
|
||||
|
||||
Value *I = const_cast<Value*>(V);
|
||||
CallSite CS;
|
||||
if (CallInst *CI = dyn_cast<CallInst>(I))
|
||||
CS = CallSite(CI);
|
||||
else if (InvokeInst *II = dyn_cast<InvokeInst>(I))
|
||||
CS = CallSite(II);
|
||||
else
|
||||
CallSite CS(const_cast<Value*>(V));
|
||||
if (!CS.getInstruction())
|
||||
return 0;
|
||||
|
||||
Function *Callee = CS.getCalledFunction();
|
||||
|
Loading…
x
Reference in New Issue
Block a user