diff options
author | Chris Lattner <sabre@nondot.org> | 2004-01-14 03:39:46 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-01-14 03:39:46 +0000 |
commit | 0cccb18c98ac83e0166eebf9c4192c6998aabf39 (patch) | |
tree | dd31d0873e87df31e9516e56b0ab7a7c360c0397 /tools/gccld/GenerateCode.cpp | |
parent | fa76183e8e28985dfd17b1d6291c939dab4cbe1d (diff) |
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
Diffstat (limited to 'tools/gccld/GenerateCode.cpp')
-rw-r--r-- | tools/gccld/GenerateCode.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp index 6fd30c8d87..d41a1f15f2 100644 --- a/tools/gccld/GenerateCode.cpp +++ b/tools/gccld/GenerateCode.cpp @@ -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)); |