summaryrefslogtreecommitdiff
path: root/tools/gccld
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-01-14 03:39:46 +0000
committerChris Lattner <sabre@nondot.org>2004-01-14 03:39:46 +0000
commit0cccb18c98ac83e0166eebf9c4192c6998aabf39 (patch)
treedd31d0873e87df31e9516e56b0ab7a7c360c0397 /tools/gccld
parentfa76183e8e28985dfd17b1d6291c939dab4cbe1d (diff)
downloadllvm-0cccb18c98ac83e0166eebf9c4192c6998aabf39.tar.gz
llvm-0cccb18c98ac83e0166eebf9c4192c6998aabf39.tar.bz2
llvm-0cccb18c98ac83e0166eebf9c4192c6998aabf39.tar.xz
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')
-rw-r--r--tools/gccld/GenerateCode.cpp3
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));