Skip to content

Commit

Permalink
Use LLVMDisposePassManager instead of raw delete in rustllvm
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyoyuppe committed Nov 25, 2019
1 parent 91642e3 commit e846ea1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rustllvm/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ LLVMRustWriteOutputFile(LLVMTargetMachineRef Target, LLVMPassManagerRef PMR,
// Apparently `addPassesToEmitFile` adds a pointer to our on-the-stack output
// stream (OS), so the only real safe place to delete this is here? Don't we
// wish this was written in Rust?
delete PM;
LLVMDisposePassManager(PMR);
return LLVMRustResult::Success;
}

Expand Down

0 comments on commit e846ea1

Please sign in to comment.