[llvm] 813b1b9 - [ORC] Add a convenience method for setting the ExecutionSession to LLJITBuilder.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 11:15:17 PST 2020


Author: Lang Hames
Date: 2020-02-20T11:15:08-08:00
New Revision: 813b1b9fd6c19706b735a595d33f7b8ebcd08be7

URL: https://github.com/llvm/llvm-project/commit/813b1b9fd6c19706b735a595d33f7b8ebcd08be7
DIFF: https://github.com/llvm/llvm-project/commit/813b1b9fd6c19706b735a595d33f7b8ebcd08be7.diff

LOG: [ORC] Add a convenience method for setting the ExecutionSession to LLJITBuilder.

Can be used to set a custom pre-configured ExecutionSession for the LLJIT or
LLLazyJIT instance being constructed.

Added: 
    

Modified: 
    llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h b/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
index c0b5012f801f..0c42aa46ce79 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
@@ -247,6 +247,13 @@ class LLJITBuilderState {
 template <typename JITType, typename SetterImpl, typename State>
 class LLJITBuilderSetters {
 public:
+
+  /// Set an ExecutionSession for this instance.
+  SetterImpl &setExecutionSession(std::unique_ptr<ExecutionSession> ES) {
+    impl().ES = std::move(ES);
+    return impl();
+  }
+
   /// Set the JITTargetMachineBuilder for this instance.
   ///
   /// If this method is not called, JITTargetMachineBuilder::detectHost will be


        


More information about the llvm-commits mailing list