mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
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:
parent
fa76183e8e
commit
0cccb18c98
@ -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));
|
||||
|
||||
|
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user