]> git.proxmox.com Git - rustc.git/blob - src/test/run-pass-fulldeps/auxiliary/llvm-pass-plugin.rs
New upstream version 1.37.0+dfsg1
[rustc.git] / src / test / run-pass-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_plugin;
8
9 use rustc_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 }