Skip to content

Commit

Permalink
Make sure the verify pass gets run after the user's loaded passes as …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Reid Spencer committed Aug 20, 2006
1 parent ec9f050 commit dcee9d0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/llvm-ld/Optimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit dcee9d0

Please sign in to comment.