[ORC] Add a convenience method for setting the ExecutionSession to LLJITBuilder.
authorLang Hames <lhames@gmail.com>
Thu, 20 Feb 2020 19:04:35 +0000 (11:04 -0800)
committerLang Hames <lhames@gmail.com>
Thu, 20 Feb 2020 19:15:08 +0000 (11:15 -0800)
Can be used to set a custom pre-configured ExecutionSession for the LLJIT or
LLLazyJIT instance being constructed.

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

index c0b5012f801fddd63c42035eb5215a56d3e3510f..0c42aa46ce79b4d37914c7ad957aeff1044e4f62 100644 (file)
@@ -247,6 +247,13 @@ public:
 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