diff options
-rw-r--r-- | tools/llvm-ld/Optimize.cpp | 5 | ||||
-rw-r--r-- | tools/opt/opt.cpp | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/tools/llvm-ld/Optimize.cpp b/tools/llvm-ld/Optimize.cpp index 25f1d7d..c0edd43 100644 --- a/tools/llvm-ld/Optimize.cpp +++ b/tools/llvm-ld/Optimize.cpp @@ -177,10 +177,7 @@ void Optimize(Module* M) { const PassInfo *Opt = OptimizationList[i]; if (Opt->getNormalCtor()) addPass(Passes, Opt->getNormalCtor()()); - else if (Opt->getTargetCtor()) { - assert(target.get() && "Could not allocate target machine!"); - addPass(Passes, Opt->getTargetCtor()(*target.get())); - } else + else std::cerr << "llvm-ld: cannot create pass: " << Opt->getPassName() << "\n"; } diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index c552d69..d0accb5 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -224,10 +224,7 @@ int main(int argc, char **argv) { Pass *P = 0; if (PassInf->getNormalCtor()) P = PassInf->getNormalCtor()(); - else if (PassInf->getTargetCtor()) { - assert(target.get() && "Could not allocate target machine!"); - P = PassInf->getTargetCtor()(*target.get()); - } else + else llvm_cerr << argv[0] << ": cannot create pass: " << PassInf->getPassName() << "\n"; if (P) { |