Skip to content

Instantly share code, notes, and snippets.

@willcrichton
Created November 30, 2014 21:53
let mut tmp = os::tmpdir();
tmp.push(Path::new("llvm_tmp"));
File::create(&tmp).write_str(gen.as_slice()).unwrap();
match Command::new(format!("llvm-as < {} | opt | llvm-dis", tmp.display())).output() {
Ok(out) => out.output.to_string(),
Err(e) => fail!("Fail? {}", e)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment