diff options
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/Support/PassNameParser.h | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/include/llvm/Support/PassNameParser.h b/llvm/include/llvm/Support/PassNameParser.h index 43561ec671b..c35f762cb8d 100644 --- a/llvm/include/llvm/Support/PassNameParser.h +++ b/llvm/include/llvm/Support/PassNameParser.h @@ -19,6 +19,7 @@  #include "Support/CommandLine.h"  #include "llvm/Pass.h"  #include <algorithm> +#include <iostream>  //===----------------------------------------------------------------------===//  // PassNameParser class - Make use of the pass registration mechanism to @@ -56,8 +57,11 @@ public:    //    virtual void passRegistered(const PassInfo *P) {      if (ignorablePass(P) || !Opt) return; -    assert(findOption(P->getPassArgument()) == getNumOptions() && -           "Two passes with the same argument attempted to be registered!"); +    if (findOption(P->getPassArgument()) != getNumOptions()) { +      std::cerr << "Two passes with the same argument (-" +                << P->getPassArgument() << ") attempted to be registered!\n"; +      abort(); +    }      addLiteralOption(P->getPassArgument(), P, P->getPassName());      Opt->addArgument(P->getPassArgument());    }  | 

