Initialize llvm::orc::ExecutionSession with default SelfExecutorProcessControl

This change imports the fix from cl/387195338 for LLVM 13-dev and makes
it work for older LLVM releases as well.

This is required since https://github.com/llvm/llvm-project/commit/2487db1f286222e2501c2fa8e8244eda13f6afc3:

"[ORC] Require ExecutorProcessControl when constructing an ExecutionSession.

Wrapper function call and dispatch handler helpers are moved to
ExecutionSession, and existing EPC-based tools are re-written to take an
ExecutionSession argument instead.

Requiring an ExecutorProcessControl instance simplifies existing EPC based
utilities (which only need to take an ES now), and should encourage more
utilities to use the EPC interface. It also simplifies process termination,
since the session can automatically call ExecutorProcessControl::disconnect
(previously this had to be done manually, and carefully ordered with the
rest of JIT tear-down to work correctly)."

Bug: LLVM build
Change-Id: Idc1f351584c39f0e48b1a2938794a89171ee50f2
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/56088
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Commit-Queue: Alexis Hétu <sugoi@google.com>
diff --git a/src/Reactor/LLVMJIT.cpp b/src/Reactor/LLVMJIT.cpp
index 6bf9323..fb22cfe 100644
--- a/src/Reactor/LLVMJIT.cpp
+++ b/src/Reactor/LLVMJIT.cpp
@@ -701,6 +701,9 @@
 	    size_t count,
 	    const rr::Config &config)
 	    : name(name)
+#if LLVM_VERSION_MAJOR >= 13
+	    , session(std::move(*llvm::orc::SelfExecutorProcessControl::Create()))
+#endif
 	    , objectLayer(session, []() {
 		    static MemoryMapper memoryMapper;
 		    return std::make_unique<llvm::SectionMemoryManager>(&memoryMapper);