diff options
| author | Keegan McAllister <kmcallister@mozilla.com> | 2015-04-08 12:52:58 -0700 |
|---|---|---|
| committer | Keegan McAllister <kmcallister@mozilla.com> | 2015-04-08 14:01:59 -0700 |
| commit | 0cb937944664f7a52895c87f9007fcdface78a7e (patch) | |
| tree | e2f903e1ea74da556af4616e19f0218436fa762e /src/librustc_driver | |
| parent | 30e7e6e8b0389d407f8b46ab605a9e3475a851d5 (diff) | |
| download | rust-0cb937944664f7a52895c87f9007fcdface78a7e.tar.gz rust-0cb937944664f7a52895c87f9007fcdface78a7e.zip | |
Allow plugins to register LLVM passes
Diffstat (limited to 'src/librustc_driver')
| -rw-r--r-- | src/librustc_driver/driver.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs index fe05b489229..e310798b20a 100644 --- a/src/librustc_driver/driver.rs +++ b/src/librustc_driver/driver.rs @@ -438,7 +438,7 @@ pub fn phase_2_configure_and_expand(sess: &Session, } }); - let Registry { syntax_exts, lint_passes, lint_groups, .. } = registry; + let Registry { syntax_exts, lint_passes, lint_groups, llvm_passes, .. } = registry; { let mut ls = sess.lint_store.borrow_mut(); @@ -449,6 +449,8 @@ pub fn phase_2_configure_and_expand(sess: &Session, for (name, to) in lint_groups { ls.register_group(Some(sess), true, name, to); } + + *sess.plugin_llvm_passes.borrow_mut() = llvm_passes; } // Lint plugins are registered; now we can process command line flags. |
