[llvm] 7581f13 - [ORC][examples] Add missing EPCIndirectionUtils::cleanup call.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Fri May 20 20:26:50 PDT 2022


Author: Lang Hames
Date: 2022-05-20T19:33:39-07:00
New Revision: 7581f138d54a117a3119a80001f4e0467d7d7b0c

URL: https://github.com/llvm/llvm-project/commit/7581f138d54a117a3119a80001f4e0467d7d7b0c
DIFF: https://github.com/llvm/llvm-project/commit/7581f138d54a117a3119a80001f4e0467d7d7b0c.diff

LOG: [ORC][examples] Add missing EPCIndirectionUtils::cleanup call.

Clients are required to make this call prior to destroying the object. Adding
the missing call fixes an assertion that was triggering at program termination
time in the LLJITWithExecutorProcessControl example.

Added: 
    

Modified: 
    llvm/examples/OrcV2Examples/LLJITWithExecutorProcessControl/LLJITWithExecutorProcessControl.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/examples/OrcV2Examples/LLJITWithExecutorProcessControl/LLJITWithExecutorProcessControl.cpp b/llvm/examples/OrcV2Examples/LLJITWithExecutorProcessControl/LLJITWithExecutorProcessControl.cpp
index 634d74d9b80ed..04c2c2e9545e3 100644
--- a/llvm/examples/OrcV2Examples/LLJITWithExecutorProcessControl/LLJITWithExecutorProcessControl.cpp
+++ b/llvm/examples/OrcV2Examples/LLJITWithExecutorProcessControl/LLJITWithExecutorProcessControl.cpp
@@ -194,5 +194,8 @@ int main(int argc, char *argv[]) {
   outs() << "---Result---\n"
          << "entry(" << argc << ") = " << Result << "\n";
 
+  // Destroy the EPCIndirectionUtils utility.
+  ExitOnErr(EPCIU->cleanup());
+
   return 0;
 }


        


More information about the llvm-commits mailing list