From 79fca6fea87be7221843031870bbf2c9ae1fc555 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 3 Aug 2010 21:48:53 +0000 Subject: 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 --- lib/Analysis/LibCallAliasAnalysis.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/Analysis/LibCallAliasAnalysis.cpp') 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; -- cgit v1.2.3