]> git.lizzy.rs Git - rust.git/blob - src/test/ui-fulldeps/auxiliary/llvm-pass-plugin.rs
Deprecate using rustc_plugin without the rustc_driver dylib.
[rust.git] / src / test / ui-fulldeps / auxiliary / llvm-pass-plugin.rs
1 // force-host
2
3 #![feature(plugin_registrar)]
4 #![feature(rustc_private)]
5
6 extern crate rustc;
7 extern crate rustc_driver;
8
9 use rustc_driver::plugin::Registry;
10
11 #[plugin_registrar]
12 pub fn plugin_registrar(reg: &mut Registry) {
13     // This pass is built in to LLVM.
14     //
15     // Normally, we would name a pass that was registered through
16     // C++ static object constructors in the same .so file as the
17     // plugin registrar.
18     reg.register_llvm_pass("gvn");
19 }