diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-30 18:50:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-30 18:50:17 +0000 |
commit | ee37bb34d133060318966b26317e063a1fee0c5f (patch) | |
tree | 75c239d904f7c341c5981af3fb5b5ed56f38ae5d | |
parent | 6c1ce21ee61f5a50c7e49e5733be7e8af3958307 (diff) |
Fix problem where subpasses would invalidate all analyses outstanding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2418 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/PassManagerT.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/VMCore/PassManagerT.h b/lib/VMCore/PassManagerT.h index c72af14ce2..e61d994d9a 100644 --- a/lib/VMCore/PassManagerT.h +++ b/lib/VMCore/PassManagerT.h @@ -440,6 +440,10 @@ template<> struct PassManagerTraits<BasicBlock> : public BasicBlockPass { virtual bool doInitialization(Module *M); virtual bool runOnBasicBlock(BasicBlock *BB); virtual bool doFinalization(Module *M); + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + } }; @@ -484,6 +488,10 @@ template<> struct PassManagerTraits<Function> : public FunctionPass { virtual bool doInitialization(Module *M); virtual bool runOnFunction(Function *F); virtual bool doFinalization(Module *M); + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + } }; |