diff --git a/src/comp/front/creader.rs b/src/comp/front/creader.rs index 2a4b4c57c25..b8ad5a94cf3 100644 --- a/src/comp/front/creader.rs +++ b/src/comp/front/creader.rs @@ -3,7 +3,6 @@ import driver.session; import front.ast; import lib.llvm.llvmext; -import lib.llvm.mk_memory_buffer; import lib.llvm.mk_object_file; import lib.llvm.mk_section_iter; import middle.fold; diff --git a/src/comp/lib/llvm.rs b/src/comp/lib/llvm.rs index 394d56e090d..5802fe19a18 100644 --- a/src/comp/lib/llvm.rs +++ b/src/comp/lib/llvm.rs @@ -1381,23 +1381,6 @@ fn mk_pass_manager() -> pass_manager { ret rec(llpm=llpm, dtor=pass_manager_dtor(llpm)); } -/* Memory-managed interface to memory buffers. */ - -obj memory_buffer_dtor(MemoryBufferRef MemBuf) { - drop { llvm.LLVMDisposeMemoryBuffer(MemBuf); } -} - -type memory_buffer = rec(MemoryBufferRef llmb, memory_buffer_dtor dtor); - -fn mk_memory_buffer(sbuf path) -> memory_buffer { - auto llmb = llvmext.LLVMRustCreateMemoryBufferWithContentsOfFile(path); - if ((llmb as int) == 0) { - log "failed to create memory buffer"; - fail; - } - ret rec(llmb=llmb, dtor=memory_buffer_dtor(llmb)); -} - /* Memory-managed interface to object files. */ obj object_file_dtor(ObjectFileRef ObjectFile) {