summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SCCP.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-04-01 08:21:08 +0000
committerGabor Greif <ggreif@gmail.com>2010-04-01 08:21:08 +0000
commit5d5db5342b32de85579fd1f6069bd60d032aed8c (patch)
tree41d92616e244e6fac08d8bc839495c10b5a0de87 /llvm/lib/Transforms/Scalar/SCCP.cpp
parent640aad76674b9e580f50123dd05d6da5580857fe (diff)
downloadbcm5719-llvm-5d5db5342b32de85579fd1f6069bd60d032aed8c.tar.gz
bcm5719-llvm-5d5db5342b32de85579fd1f6069bd60d032aed8c.zip
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. llvm-svn: 100100
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SCCP.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/SCCP.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp
index b15df2acaa7..546b7b6cc29 100644
--- a/llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -1717,7 +1717,7 @@ static bool AddressIsTaken(const GlobalValue *GV) {
return true; // Storing addr of GV.
} else if (isa<InvokeInst>(U) || isa<CallInst>(U)) {
// Make sure we are calling the function, not passing the address.
- CallSite CS((Instruction*)U);
+ ImmutableCallSite CS(cast<Instruction>(U));
if (!CS.isCallee(UI))
return true;
} else if (const LoadInst *LI = dyn_cast<LoadInst>(U)) {
OpenPOWER on IntegriCloud