[llvm] 99a7e30 - [C-API][ORC] Add missing error check to unit test.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 13 13:53:59 PDT 2022
Author: Lang Hames
Date: 2022-06-13T13:53:51-07:00
New Revision: 99a7e307ffc7f411f6379e8c03282f7d81fac15c
URL: https://github.com/llvm/llvm-project/commit/99a7e307ffc7f411f6379e8c03282f7d81fac15c
DIFF: https://github.com/llvm/llvm-project/commit/99a7e307ffc7f411f6379e8c03282f7d81fac15c.diff
LOG: [C-API][ORC] Add missing error check to unit test.
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 3a55efdb9a40..0a18fda0d4e0 100644
--- a/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
@@ -255,7 +255,9 @@ TEST_F(OrcCAPITestBase, MaterializationUnitCreation) {
LLVMOrcCSymbolMapPair Pair = {Name, Sym};
LLVMOrcCSymbolMapPair Pairs[] = {Pair};
LLVMOrcMaterializationUnitRef MU = LLVMOrcAbsoluteSymbols(Pairs, 1);
- LLVMOrcJITDylibDefine(MainDylib, MU);
+ if (LLVMErrorRef E = LLVMOrcJITDylibDefine(MainDylib, MU))
+ FAIL() << "Unexpected error while adding \"test\" symbol (triple = "
+ << TargetTriple << "): " << toString(E);
LLVMOrcJITTargetAddress OutAddr;
if (LLVMErrorRef E = LLVMOrcLLJITLookup(Jit, &OutAddr, "test"))
FAIL() << "Failed to look up \"test\" symbol (triple = " << TargetTriple
More information about the llvm-commits
mailing list