summaryrefslogtreecommitdiff
path: root/lib/Analysis/LibCallAliasAnalysis.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-03 21:48:53 +0000
committerDan Gohman <gohman@apple.com>2010-08-03 21:48:53 +0000
commit79fca6fea87be7221843031870bbf2c9ae1fc555 (patch)
tree54e9443ce805156c7af23377014de5e5526c8d35 /lib/Analysis/LibCallAliasAnalysis.cpp
parentd1fb583128c6682bb8a7c74eafa810a9270cc8df (diff)
downloadllvm-79fca6fea87be7221843031870bbf2c9ae1fc555.tar.gz
llvm-79fca6fea87be7221843031870bbf2c9ae1fc555.tar.bz2
llvm-79fca6fea87be7221843031870bbf2c9ae1fc555.tar.xz
Thread const correctness through a bunch of AliasAnalysis interfaces and
eliminate several const_casts. Make CallSite implicitly convertible to ImmutableCallSite. Rename the getModRefBehavior for intrinsic IDs to getIntrinsicModRefBehavior to avoid overload ambiguity with CallSite, which happens to be implicitly convertible to bool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LibCallAliasAnalysis.cpp')
-rw-r--r--lib/Analysis/LibCallAliasAnalysis.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Analysis/LibCallAliasAnalysis.cpp b/lib/Analysis/LibCallAliasAnalysis.cpp
index 9dca93f9e7..7f51202ecb 100644
--- a/lib/Analysis/LibCallAliasAnalysis.cpp
+++ b/lib/Analysis/LibCallAliasAnalysis.cpp
@@ -43,7 +43,7 @@ void LibCallAliasAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
/// vs the specified pointer/size.
AliasAnalysis::ModRefResult
LibCallAliasAnalysis::AnalyzeLibCallDetails(const LibCallFunctionInfo *FI,
- CallSite CS, Value *P,
+ ImmutableCallSite CS, const Value *P,
unsigned Size) {
// If we have a function, check to see what kind of mod/ref effects it
// has. Start by including any info globally known about the function.
@@ -117,13 +117,14 @@ LibCallAliasAnalysis::AnalyzeLibCallDetails(const LibCallFunctionInfo *FI,
// specified memory object.
//
AliasAnalysis::ModRefResult
-LibCallAliasAnalysis::getModRefInfo(CallSite CS, Value *P, unsigned Size) {
+LibCallAliasAnalysis::getModRefInfo(ImmutableCallSite CS,
+ const Value *P, unsigned Size) {
ModRefResult MRInfo = ModRef;
// If this is a direct call to a function that LCI knows about, get the
// information about the runtime function.
if (LCI) {
- if (Function *F = CS.getCalledFunction()) {
+ if (const Function *F = CS.getCalledFunction()) {
if (const LibCallFunctionInfo *FI = LCI->getFunctionInfo(F)) {
MRInfo = ModRefResult(MRInfo & AnalyzeLibCallDetails(FI, CS, P, Size));
if (MRInfo == NoModRef) return NoModRef;