diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-08-20 20:54:38 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-08-20 20:54:38 +0000 |
commit | dcee9d093fc81bbf47567d73aa46d8d6fe42dec1 (patch) | |
tree | 9cba47251b7bfad9c5c247479cb1ae8f5d6b0866 /tools/llvm-ld | |
parent | ec9f05056040b1134e414477e3e11a1d6c30ab73 (diff) | |
download | external_llvm-dcee9d093fc81bbf47567d73aa46d8d6fe42dec1.zip external_llvm-dcee9d093fc81bbf47567d73aa46d8d6fe42dec1.tar.gz external_llvm-dcee9d093fc81bbf47567d73aa46d8d6fe42dec1.tar.bz2 |
Make sure the verify pass gets run after the user's loaded passes as well
when the verify-each option is given.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29783 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ld')
-rw-r--r-- | tools/llvm-ld/Optimize.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/llvm-ld/Optimize.cpp b/tools/llvm-ld/Optimize.cpp index e6387fe..f539703 100644 --- a/tools/llvm-ld/Optimize.cpp +++ b/tools/llvm-ld/Optimize.cpp @@ -175,12 +175,11 @@ void Optimize(Module* M) { std::auto_ptr<TargetMachine> target; for (unsigned i = 0; i < OptimizationList.size(); ++i) { const PassInfo *Opt = OptimizationList[i]; - if (Opt->getNormalCtor()) - Passes.add(Opt->getNormalCtor()()); + addPass(Passes, Opt->getNormalCtor()()); else if (Opt->getTargetCtor()) { assert(target.get() && "Could not allocate target machine!"); - Passes.add(Opt->getTargetCtor()(*target.get())); + addPass(Passes, Opt->getTargetCtor()(*target.get())); } else std::cerr << "llvm-ld: cannot create pass: " << Opt->getPassName() << "\n"; |