Skip to content

Instantly share code, notes, and snippets.

@willcrichton
Created November 30, 2014 21:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willcrichton/ec8a0f6ada3caaeda1d0 to your computer and use it in GitHub Desktop.
Save willcrichton/ec8a0f6ada3caaeda1d0 to your computer and use it in GitHub Desktop.
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