[PATCH] D100506: [Test][ORC] Add tests for parts of the LLVM-C OrcJIT v2 API
Lang Hames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 25 18:39:27 PDT 2021
lhames accepted this revision.
lhames added a comment.
This revision is now accepted and ready to land.
The test passes with the following changes:
diff --git a/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp b/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
index 7425f8828fc3..6f00c087f273 100644
--- a/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
@@ -121,7 +121,7 @@ TEST_F(OrcCAPITestBase, JITDylibLookup) {
TEST_F(OrcCAPITestBase, MaterializationUnitCreation) {
LLVMOrcSymbolStringPoolEntryRef Name =
- LLVMOrcExecutionSessionIntern(ExecutionSession, "test");
+ LLVMOrcLLJITMangleAndIntern(Jit, "test");
LLVMJITSymbolFlags Flags = {LLVMJITSymbolGenericFlagsWeak, 0};
LLVMOrcJITTargetAddress Addr =
(LLVMOrcJITTargetAddress)(&materializationUnitFn);
@@ -172,13 +172,8 @@ TEST_F(OrcCAPITestBase, ResourceTrackerDefinitionLifetime) {
LLVMErrorRef Err = LLVMOrcLLJITLookup(Jit, &OutAddr, "sum");
ASSERT_TRUE(Err);
ASSERT_FALSE(OutAddr);
- LLVMOrcExecutionSessionRef ES = LLVMOrcLLJITGetExecutionSession(Jit);
- // FIXME: Provide a better way of clearing dangling references in
- // SymbolStringPool from implicit calls
- LLVMOrcSymbolStringPoolEntryRef Name =
- LLVMOrcExecutionSessionIntern(ES, "sum");
- LLVMOrcReleaseSymbolStringPoolEntry(Name);
- LLVMOrcReleaseSymbolStringPoolEntry(Name);
+ LLVMOrcReleaseResourceTracker(RT);
+ LLVMConsumeError(Err);
}
TEST_F(OrcCAPITestBase, ResourceTrackerTransfer) {
It also helped identify a bug in EHFrameRegistrationPlugin::notifyTransferringResources that was fixed in c1baf946e6c <https://reviews.llvm.org/rGc1baf946e6cf611ae871e34db5cfea0f94f4b5a0>. Nice!
With the changes applied this all looks good to me. If you're happy with everything I'll go ahead and commit on your behalf.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100506/new/
https://reviews.llvm.org/D100506
More information about the llvm-commits
mailing list