diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-04-01 08:21:08 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-04-01 08:21:08 +0000 |
commit | c8b82ccbcf3b2e2384d2c0b5176e7b0b40b7f82f (patch) | |
tree | f83b4be77578085e4ad3be52f2979d0d7ba5d6c6 /lib/Transforms/Scalar/SCCP.cpp | |
parent | 2d7820cb782d6f2ee74b3c9e90438229324f84cd (diff) | |
download | external_llvm-c8b82ccbcf3b2e2384d2c0b5176e7b0b40b7f82f.zip external_llvm-c8b82ccbcf3b2e2384d2c0b5176e7b0b40b7f82f.tar.gz external_llvm-c8b82ccbcf3b2e2384d2c0b5176e7b0b40b7f82f.tar.bz2 |
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
Diffstat (limited to 'lib/Transforms/Scalar/SCCP.cpp')
-rw-r--r-- | lib/Transforms/Scalar/SCCP.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index b15df2a..546b7b6 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/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)) { |