[clang] [llvm] [Clang-Repl] Add pipe-based redirection and fetch PID of launched executor (PR #147478)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 8 01:10:35 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- clang/include/clang/Interpreter/RemoteJITUtils.h clang/lib/Interpreter/RemoteJITUtils.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/include/clang/Interpreter/RemoteJITUtils.h b/clang/include/clang/Interpreter/RemoteJITUtils.h
index 8fc520380..331164f54 100644
--- a/clang/include/clang/Interpreter/RemoteJITUtils.h
+++ b/clang/include/clang/Interpreter/RemoteJITUtils.h
@@ -38,7 +38,6 @@ llvm::Expected<std::unique_ptr<llvm::orc::SimpleRemoteEPC>>
connectTCPSocket(llvm::StringRef NetworkAddress, bool UseSharedMemory,
llvm::StringRef SlabAllocateSizeString);
-
/// Returns PID of last launched executor.
pid_t getLastLaunchedExecutorPID();
diff --git a/clang/lib/Interpreter/RemoteJITUtils.cpp b/clang/lib/Interpreter/RemoteJITUtils.cpp
index 1b414dcd5..fc287fdcb 100644
--- a/clang/lib/Interpreter/RemoteJITUtils.cpp
+++ b/clang/lib/Interpreter/RemoteJITUtils.cpp
@@ -288,12 +288,14 @@ connectTCPSocket(StringRef NetworkAddress, bool UseSharedMemory,
#endif
}
-pid_t getLastLaunchedExecutorPID() {
- if(!LaunchedExecutorPID.size()) return -1;
- return LaunchedExecutorPID.back();
+pid_t getLastLaunchedExecutorPID() {
+ if (!LaunchedExecutorPID.size())
+ return -1;
+ return LaunchedExecutorPID.back();
}
-pid_t getNthLaunchedExecutorPID(int n) {
- if (n - 1 < 0 || n - 1 >= static_cast<int>(LaunchedExecutorPID.size())) return -1;
- return LaunchedExecutorPID.at(n - 1);
+pid_t getNthLaunchedExecutorPID(int n) {
+ if (n - 1 < 0 || n - 1 >= static_cast<int>(LaunchedExecutorPID.size()))
+ return -1;
+ return LaunchedExecutorPID.at(n - 1);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/147478
More information about the llvm-commits
mailing list