提交 dd33b145 编写于 作者: A Alex Crichton

Fix usage of rustc --ls on invalid files

Closes #11259
上级 c34ef5d7
......@@ -1936,7 +1936,7 @@ pub fn new(llmb: MemoryBufferRef) -> Option<ObjectFile> {
unsafe {
let llof = llvm::LLVMCreateObjectFile(llmb);
if llof as int == 0 {
llvm::LLVMDisposeMemoryBuffer(llmb);
// LLVMCreateObjectFile took ownership of llmb
return None
}
......
-include ../tools.mk
all:
$(RUSTC) foo.rs
$(RUSTC) --ls $(TMPDIR)/foo
touch $(TMPDIR)/bar
$(RUSTC) --ls $(TMPDIR)/bar
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册