[llvm-commits] [llvm] r109883 - /llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h
Nick Lewycky
nicholas at mxc.ca
Fri Jul 30 13:19:09 PDT 2010
Author: nicholas
Date: Fri Jul 30 15:19:09 2010
New Revision: 109883
URL: http://llvm.org/viewvc/llvm-project?rev=109883&view=rev
Log:
LibCallAliasAnalysis uses multiple inheritance, so it needs to implement
getAdjustedAnalysisPointer. Part of a fix to PR7760.
Modified:
llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h
Modified: llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h?rev=109883&r1=109882&r2=109883&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h (original)
+++ llvm/trunk/include/llvm/Analysis/LibCallAliasAnalysis.h Fri Jul 30 15:19:09 2010
@@ -49,6 +49,16 @@
return false;
}
+ /// getAdjustedAnalysisPointer - This method is used when a pass implements
+ /// an analysis interface through multiple inheritance. If needed, it
+ /// should override this to adjust the this pointer as needed for the
+ /// specified pass info.
+ virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
+ if (PI->isPassID(&AliasAnalysis::ID))
+ return (AliasAnalysis*)this;
+ return this;
+ }
+
private:
ModRefResult AnalyzeLibCallDetails(const LibCallFunctionInfo *FI,
CallSite CS, Value *P, unsigned Size);
More information about the llvm-commits
mailing list