[llvm] 0bef557 - [ORC] Add missing LLVMConsumeError calls.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 26 21:30:44 PDT 2021


Author: Lang Hames
Date: 2021-04-26T21:30:37-07:00
New Revision: 0bef55738e13c27203c22fcc56f76ebc0e8cd7ca

URL: https://github.com/llvm/llvm-project/commit/0bef55738e13c27203c22fcc56f76ebc0e8cd7ca
DIFF: https://github.com/llvm/llvm-project/commit/0bef55738e13c27203c22fcc56f76ebc0e8cd7ca.diff

LOG: [ORC] Add missing LLVMConsumeError calls.

Added: 
    

Modified: 
    llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp b/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
index 675900a5abef..d98bdaa230a2 100644
--- a/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
@@ -297,10 +297,12 @@ TEST_F(OrcCAPITestBase, ExecutionTest) {
   LLVMInitializeNativeAsmPrinter();
   LLVMOrcThreadSafeModuleRef TSM = createTestModule();
   if (LLVMErrorRef E = LLVMOrcLLJITAddLLVMIRModule(Jit, MainDylib, TSM)) {
+    LLVMConsumeError(E);
     FAIL() << "Failed to add LLVM IR module to LLJIT";
   }
   LLVMOrcJITTargetAddress TestFnAddr;
-  if (LLVMOrcLLJITLookup(Jit, &TestFnAddr, "sum")) {
+  if (LLVMErrorRef E = LLVMOrcLLJITLookup(Jit, &TestFnAddr, "sum")) {
+    LLVMConsumeError(E);
     FAIL() << "Symbol \"sum\" was not added into JIT";
   }
   auto *SumFn = (SumFunctionType)(TestFnAddr);


        


More information about the llvm-commits mailing list