[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.
This commit is contained in:
Lang Hames 2022-08-05 11:41:38 -07:00
parent 51bc82d147
commit 424626953e
1 changed files with 1 additions and 0 deletions

View File

@ -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;