diff options
| author | Brian Anderson <andersrb@gmail.com> | 2011-05-23 19:49:23 -0400 |
|---|---|---|
| committer | Brian Anderson <andersrb@gmail.com> | 2011-05-23 19:52:57 -0400 |
| commit | 2505a2312eeae17cbf261833af5c2cab40f698e2 (patch) | |
| tree | 59e3462e2d854401b0deb125e24d6663ca7df403 /src/comp | |
| parent | 8637c09cf920725c0e813f2c9e69cdb12683030b (diff) | |
| download | rust-2505a2312eeae17cbf261833af5c2cab40f698e2.tar.gz rust-2505a2312eeae17cbf261833af5c2cab40f698e2.zip | |
rustc: Run the llvm verifier pass before optimization. Closes #376
The optimization passes were hiding some codegen errors so now we run the verifier both before and after optimization.
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/back/link.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/comp/back/link.rs b/src/comp/back/link.rs index d0e6b5a7c6f..e75e8be4f3a 100644 --- a/src/comp/back/link.rs +++ b/src/comp/back/link.rs @@ -115,6 +115,10 @@ mod write { } } + if (opts.verify) { + llvm::LLVMAddVerifierPass(pm.llpm); + } + // FIXME: This is mostly a copy of the bits of opt's -O2 that are // available in the C api. // FIXME2: We might want to add optimization levels like -O1, -O2, |
