mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[ORC] Make LLVMOrcLLJITBuilderSetJITTargetMachineBuilder consume as advertised.
This should fix some of the memory leaks seen in the ORC C API test case.
This commit is contained in:
parent
84d50c8446
commit
53ce1eab3b
@ -635,8 +635,9 @@ LLVMErrorRef LLVMOrcJITTargetMachineBuilderDetectHost(
|
||||
*
|
||||
* This operation takes ownership of the given TargetMachine and destroys it
|
||||
* before returing. The resulting JITTargetMachineBuilder is owned by the client
|
||||
* and must be passed to a consuming operation (e.g. LLVMOrcCreateLLJITBuilder)
|
||||
* or disposed of by calling LLVMOrcDisposeJITTargetMachineBuilder.
|
||||
* and must be passed to a consuming operation (e.g.
|
||||
* LLVMOrcLLJITBuilderSetJITTargetMachineBuilder) or disposed of by calling
|
||||
* LLVMOrcDisposeJITTargetMachineBuilder.
|
||||
*/
|
||||
LLVMOrcJITTargetMachineBuilderRef
|
||||
LLVMOrcJITTargetMachineBuilderCreateFromTargetMachine(LLVMTargetMachineRef TM);
|
||||
|
@ -513,7 +513,8 @@ void LLVMOrcDisposeLLJITBuilder(LLVMOrcLLJITBuilderRef Builder) {
|
||||
|
||||
void LLVMOrcLLJITBuilderSetJITTargetMachineBuilder(
|
||||
LLVMOrcLLJITBuilderRef Builder, LLVMOrcJITTargetMachineBuilderRef JTMB) {
|
||||
unwrap(Builder)->setJITTargetMachineBuilder(*unwrap(JTMB));
|
||||
unwrap(Builder)->setJITTargetMachineBuilder(std::move(*unwrap(JTMB)));
|
||||
LLVMOrcDisposeJITTargetMachineBuilder(JTMB);
|
||||
}
|
||||
|
||||
void LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator(
|
||||
|
Loading…
Reference in New Issue
Block a user