From b2bdf941f66f367cfaed58497513238167910486 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Fri, 30 Jul 2010 20:19:09 +0000 Subject: [PATCH] LibCallAliasAnalysis uses multiple inheritance, so it needs to implement getAdjustedAnalysisPointer. Part of a fix to PR7760. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109883 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/LibCallAliasAnalysis.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/llvm/Analysis/LibCallAliasAnalysis.h b/include/llvm/Analysis/LibCallAliasAnalysis.h index 01f108d2904..c256230fc5d 100644 --- a/include/llvm/Analysis/LibCallAliasAnalysis.h +++ b/include/llvm/Analysis/LibCallAliasAnalysis.h @@ -49,6 +49,16 @@ namespace llvm { 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); -- 2.34.1