Skip to content

Commit e846ea1

Browse files
committedNov 25, 2019
Use LLVMDisposePassManager instead of raw delete in rustllvm
1 parent 91642e3 commit e846ea1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/rustllvm/PassWrapper.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ LLVMRustWriteOutputFile(LLVMTargetMachineRef Target, LLVMPassManagerRef PMR,
537537
// Apparently `addPassesToEmitFile` adds a pointer to our on-the-stack output
538538
// stream (OS), so the only real safe place to delete this is here? Don't we
539539
// wish this was written in Rust?
540-
delete PM;
540+
LLVMDisposePassManager(PMR);
541541
return LLVMRustResult::Success;
542542
}
543543

0 commit comments

Comments
 (0)
Please sign in to comment.