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 | 5d5db5342b32de85579fd1f6069bd60d032aed8c (patch) | |
| tree | 41d92616e244e6fac08d8bc839495c10b5a0de87 /llvm/lib/Transforms/Scalar/SCCP.cpp | |
| parent | 640aad76674b9e580f50123dd05d6da5580857fe (diff) | |
| download | llvm-5d5db5342b32de85579fd1f6069bd60d032aed8c.zip llvm-5d5db5342b32de85579fd1f6069bd60d032aed8c.tar.gz llvm-5d5db5342b32de85579fd1f6069bd60d032aed8c.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.
llvm-svn: 100100
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SCCP.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/SCCP.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index b15df2a..546b7b6 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)) { |
