[llvm] r243609 - [MCJIT] Fix a memory leak in a unit test that was introduced in r243589.

Lang Hames lhames at gmail.com
Wed Jul 29 19:05:37 PDT 2015


Author: lhames
Date: Wed Jul 29 21:05:37 2015
New Revision: 243609

URL: http://llvm.org/viewvc/llvm-project?rev=243609&view=rev
Log:
[MCJIT] Fix a memory leak in a unit test that was introduced in r243589.

Modified:
    llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp

Modified: llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp?rev=243609&r1=243608&r2=243609&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp Wed Jul 29 21:05:37 2015
@@ -505,6 +505,7 @@ TEST_F(MCJITCAPITest, addGlobalMapping)
   LLVMPositionBuilderAtEnd(Builder, Entry);
   LLVMValueRef RetVal = LLVMBuildCall(Builder, MappedFn, NULL, 0, "");
   LLVMBuildRet(Builder, RetVal);
+  LLVMDisposeBuilder(Builder);
 
   LLVMVerifyModule(Module, LLVMAbortProcessAction, &Error);
   LLVMDisposeMessage(Error);





More information about the llvm-commits mailing list