diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-20 19:53:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-20 19:53:32 +0000 |
commit | 3b03327c14e19716ec2e2541875deca947ebd9d5 (patch) | |
tree | 0280bcac6b4baa8a9dcd472bfcb46566cd323622 /llvm/lib/Analysis/IPA/GlobalsModRef.cpp | |
parent | 16139b5f2df5acf1744691a3260ef764f4cf18b6 (diff) | |
download | bcm5719-llvm-3b03327c14e19716ec2e2541875deca947ebd9d5.tar.gz bcm5719-llvm-3b03327c14e19716ec2e2541875deca947ebd9d5.zip |
adopt getAdjustedAnalysisPointer in two more passes.
llvm-svn: 94017
Diffstat (limited to 'llvm/lib/Analysis/IPA/GlobalsModRef.cpp')
-rw-r--r-- | llvm/lib/Analysis/IPA/GlobalsModRef.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp index a979a99a4de..e803a488a80 100644 --- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp @@ -145,6 +145,16 @@ namespace { virtual void deleteValue(Value *V); virtual void copyValue(Value *From, Value *To); + /// 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: /// getFunctionInfo - Return the function info for the function, or null if /// we don't have anything useful to say about it. |