[clang] [Clang-Repl] Add Lambda Support, PID Retrieval, and Dynamic liborc_rt Path in Clang-Repl (PR #155140)

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 28 00:57:27 PDT 2025


================
@@ -460,10 +464,99 @@ const char *const Runtimes = R"(
   EXTERN_C void __clang_Interpreter_SetValueNoAlloc(void *This, void *OutVal, void *OpaqueType, ...);
 )";
 
+llvm::ExitOnError ExitOnErr;
+
+std::unique_ptr<llvm::orc::LLJITBuilder>
+Interpreter::outOfProcessJITBuilder(OutOfProcessJITConfig OutOfProcessConfig) {
+  std::unique_ptr<llvm::orc::ExecutorProcessControl> EPC;
+  if (OutOfProcessConfig.OOPExecutor != "") {
+    // Launch an out-of-process executor locally in a child process.
+    EPC = ExitOnErr(launchExecutor(OutOfProcessConfig.OOPExecutor,
----------------
vgvassilev wrote:

Remember this is the library, it must not abort the process. Instead the interface should return `llvm::Expected<std::unique_ptr<llvm::orc::LLJITBuilder>>` and propagate the error up.

https://github.com/llvm/llvm-project/pull/155140


More information about the cfe-commits mailing list