LibCallAliasAnalysis uses multiple inheritance, so it needs to implement
authorNick Lewycky <nicholas@mxc.ca>
Fri, 30 Jul 2010 20:19:09 +0000 (20:19 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Fri, 30 Jul 2010 20:19:09 +0000 (20:19 +0000)
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

index 01f108d290426b57af1b2147a4dbf48f9a18a928..c256230fc5d5c50c6a1e97fd420b392fb1b7b227 100644 (file)
@@ -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);