[llvm] 4246269 - [examples][ORC] Add missing call to LLVMDisposeBuilder to example.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 5 13:52:10 PDT 2022
Author: Lang Hames
Date: 2022-08-05T13:52:03-07:00
New Revision: 424626953e89ec555501320ce06513aebf8e6aec
URL: https://github.com/llvm/llvm-project/commit/424626953e89ec555501320ce06513aebf8e6aec
DIFF: https://github.com/llvm/llvm-project/commit/424626953e89ec555501320ce06513aebf8e6aec.diff
LOG: [examples][ORC] Add missing call to LLVMDisposeBuilder to example.
The missing call was pointed out in https://llvm.org/PR56953, though it's not
the focus of that issue.
Added:
Modified:
llvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/OrcV2CBindingsIRTransforms.c
Removed:
################################################################################
diff --git a/llvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/OrcV2CBindingsIRTransforms.c b/llvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/OrcV2CBindingsIRTransforms.c
index 81b34388a945e..692529d555435 100644
--- a/llvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/OrcV2CBindingsIRTransforms.c
+++ b/llvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/OrcV2CBindingsIRTransforms.c
@@ -47,6 +47,7 @@ LLVMOrcThreadSafeModuleRef createDemoModule(void) {
LLVMValueRef SumArg1 = LLVMGetParam(SumFunction, 1);
LLVMValueRef Result = LLVMBuildAdd(Builder, SumArg0, SumArg1, "result");
LLVMBuildRet(Builder, Result);
+ LLVMDisposeBuilder(Builder);
LLVMOrcThreadSafeModuleRef TSM = LLVMOrcCreateNewThreadSafeModule(M, TSCtx);
LLVMOrcDisposeThreadSafeContext(TSCtx);
return TSM;
More information about the llvm-commits
mailing list