Dump the contents of the object file for further analysis.

This commit is contained in:
Nick Lewycky 2019-09-14 00:12:00 -07:00
parent 2d209385c5
commit 34122723a1

View File

@ -198,6 +198,7 @@ impl LLVMBackend {
.write_to_memory_buffer(&module, FileType::Object)
.unwrap();
let mem_buf_slice = memory_buffer.as_slice();
dbg!(&mem_buf_slice);
if let Some(path) = unsafe { &crate::GLOBAL_OPTIONS.obj_file } {
let mut file = File::create(path).unwrap();