Make sure to verify the result before writing out the bytecode file. Not doing

so can cause obscure errors downstream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10840 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-01-14 03:39:46 +00:00
parent fa76183e8e
commit 0cccb18c98
2 changed files with 6 additions and 0 deletions

View File

@ -165,6 +165,9 @@ int main(int argc, char **argv) {
//
AddConfiguredTransformationPasses(Passes);
// Make sure everything is still good.
Passes.add(createVerifierPass());
// Write bytecode to file...
Passes.add(new WriteBytecodePass(Out));

View File

@ -125,6 +125,9 @@ GenerateBytecode (Module *M, bool Strip, bool Internalize, std::ostream *Out) {
addPass(Passes, createGlobalDCEPass());
}
// Make sure everything is still good.
Passes.add(createVerifierPass());
// Add the pass that writes bytecode to the output file...
addPass(Passes, new WriteBytecodePass(Out));