From afe629dba136cf4ede364946c082490e9c69d4bc Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 24 Mar 2012 20:02:25 +0000 Subject: [PATCH] Remove always true variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153392 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Verifier.cpp | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index f62441bea7a..b6648016c66 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -118,7 +118,6 @@ namespace { struct Verifier : public FunctionPass, public InstVisitor { 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(); + DT = &getAnalysis(); 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(); + AU.addRequired(); } /// abortIfBroken - If the module is broken and we are supposed to abort on -- 2.34.1