diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-03-24 20:02:25 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-03-24 20:02:25 +0000 |
commit | afe629dba136cf4ede364946c082490e9c69d4bc (patch) | |
tree | 13ac43dc5cd20604b9029fb170d41e823c1c20f1 /lib/VMCore | |
parent | 692cd4596e722abe70dec2c49f3c9935e1212730 (diff) | |
download | external_llvm-afe629dba136cf4ede364946c082490e9c69d4bc.zip external_llvm-afe629dba136cf4ede364946c082490e9c69d4bc.tar.gz external_llvm-afe629dba136cf4ede364946c082490e9c69d4bc.tar.bz2 |
Remove always true variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153392 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index f62441b..b664801 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -118,7 +118,6 @@ namespace { struct Verifier : public FunctionPass, public InstVisitor<Verifier> { static char ID; // Pass ID, replacement for typeid bool Broken; // Is this module found to be broken? - bool RealPass; // Are we not being run by a PassManager? VerifierFailureAction action; // What to do if verification fails. Module *Mod; // Module we are verifying right now @@ -144,13 +143,13 @@ namespace { const Value *PersonalityFn; Verifier() - : FunctionPass(ID), Broken(false), RealPass(true), + : FunctionPass(ID), Broken(false), action(AbortProcessAction), Mod(0), Context(0), DT(0), MessagesStr(Messages), PersonalityFn(0) { initializeVerifierPass(*PassRegistry::getPassRegistry()); } explicit Verifier(VerifierFailureAction ctn) - : FunctionPass(ID), Broken(false), RealPass(true), action(ctn), Mod(0), + : FunctionPass(ID), Broken(false), action(ctn), Mod(0), Context(0), DT(0), MessagesStr(Messages), PersonalityFn(0) { initializeVerifierPass(*PassRegistry::getPassRegistry()); } @@ -159,17 +158,14 @@ namespace { Mod = &M; Context = &M.getContext(); - // If this is a real pass, in a pass manager, we must abort before - // returning back to the pass manager, or else the pass manager may try to - // run other passes on the broken module. - if (RealPass) - return abortIfBroken(); - return false; + // We must abort before returning back to the pass manager, or else the + // pass manager may try to run other passes on the broken module. + return abortIfBroken(); } bool runOnFunction(Function &F) { // Get dominator information if we are being run by PassManager - if (RealPass) DT = &getAnalysis<DominatorTree>(); + DT = &getAnalysis<DominatorTree>(); Mod = F.getParent(); if (!Context) Context = &F.getContext(); @@ -178,13 +174,9 @@ namespace { InstsInThisBlock.clear(); PersonalityFn = 0; - // If this is a real pass, in a pass manager, we must abort before - // returning back to the pass manager, or else the pass manager may try to - // run other passes on the broken module. - if (RealPass) - return abortIfBroken(); - - return false; + // We must abort before returning back to the pass manager, or else the + // pass manager may try to run other passes on the broken module. + return abortIfBroken(); } bool doFinalization(Module &M) { @@ -215,8 +207,7 @@ namespace { virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequiredID(PreVerifyID); - if (RealPass) - AU.addRequired<DominatorTree>(); + AU.addRequired<DominatorTree>(); } /// abortIfBroken - If the module is broken and we are supposed to abort on |