From 571dd5778f46d542bdc858578ceb7ab7e5e87793 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 1 Dec 2006 21:59:37 +0000 Subject: [PATCH] target constructors are never used llvm-svn: 32099 --- llvm/tools/llvm-ld/Optimize.cpp | 5 +---- llvm/tools/opt/opt.cpp | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/llvm/tools/llvm-ld/Optimize.cpp b/llvm/tools/llvm-ld/Optimize.cpp index 25f1d7d1d535..c0edd43efcf1 100644 --- a/llvm/tools/llvm-ld/Optimize.cpp +++ b/llvm/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/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index c552d694fb39..d0accb53636c 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/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) {