mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
Introduce ImmutableCallSite, useful for contexts where no mutation
is necessary. Inherits from new templated baseclass CallSiteBase<> which is highly customizable. Base CallSite on it too, in a configuration that allows full mutation. Adapt some call sites in analyses to employ ImmutableCallSite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100100 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -408,7 +408,7 @@ bool Function::hasAddressTaken(const User* *PutOffender) const {
|
||||
const User *U = *I;
|
||||
if (!isa<CallInst>(U) && !isa<InvokeInst>(U))
|
||||
return PutOffender ? (*PutOffender = U, true) : true;
|
||||
CallSite CS(const_cast<Instruction*>(static_cast<const Instruction*>(U)));
|
||||
ImmutableCallSite CS(cast<Instruction>(U));
|
||||
if (!CS.isCallee(I))
|
||||
return PutOffender ? (*PutOffender = U, true) : true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user