LibCallAliasAnalysis uses multiple inheritance, so it needs to implement
[oota-llvm.git] / 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);