[clang] [llvm] [Clang-Repl] Add custom function as lambda in launchExecutor and fetch PID of launched executor (PR #147478)

Vassil Vassilev via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 11 03:27:02 PDT 2025


================
@@ -91,7 +95,8 @@ createSharedMemoryManager(SimpleRemoteEPC &SREPC,
 
 Expected<std::unique_ptr<SimpleRemoteEPC>>
 launchExecutor(StringRef ExecutablePath, bool UseSharedMemory,
-               llvm::StringRef SlabAllocateSizeString) {
+               llvm::StringRef SlabAllocateSizeString,
+               std::function<void()> CustomizeFork) {
----------------
vgvassilev wrote:

Why not doing something like:
```suggestion
               std::function<void()> InitChild = [](){/*move the code from `if (Child)` into a default lambda here...*/}) {
```

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


More information about the llvm-commits mailing list