Use LLVMDisposePassManager instead of raw delete in rustllvm
This commit is contained in:
parent
91642e3ac0
commit
e846ea1112
1 changed files with 1 additions and 1 deletions
|
@ -537,7 +537,7 @@ LLVMRustWriteOutputFile(LLVMTargetMachineRef Target, LLVMPassManagerRef PMR,
|
||||||
// Apparently `addPassesToEmitFile` adds a pointer to our on-the-stack output
|
// 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
|
// stream (OS), so the only real safe place to delete this is here? Don't we
|
||||||
// wish this was written in Rust?
|
// wish this was written in Rust?
|
||||||
delete PM;
|
LLVMDisposePassManager(PMR);
|
||||||
return LLVMRustResult::Success;
|
return LLVMRustResult::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue