[llvm] [ORC] Rename WrapperFunctionResult to WrapperFunctionBuffer. NFCI. (PR #172633)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 17 03:26:06 PST 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 origin/main HEAD --extensions cpp,h -- llvm/include/llvm/ExecutionEngine/Orc/CallSPSViaEPC.h llvm/include/llvm/ExecutionEngine/Orc/CallViaEPC.h llvm/include/llvm/ExecutionEngine/Orc/Core.h llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h llvm/include/llvm/ExecutionEngine/Orc/SelfExecutorProcessControl.h llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/ExecutorSharedMemoryMapperService.h llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderPerf.h llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderVTune.h llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.h llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.h llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.h llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.h llvm/lib/ExecutionEngine/Orc/Core.cpp llvm/lib/ExecutionEngine/Orc/SelfExecutorProcessControl.cpp llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp llvm/lib/ExecutionEngine/Orc/TargetProcess/ExecutorSharedMemoryMapperService.cpp llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderPerf.cpp llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderVTune.cpp llvm/lib/ExecutionEngine/Orc/TargetProcess/OrcRTBootstrap.cpp llvm/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.cpp llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp llvm/unittests/ExecutionEngine/Orc/CallSPSViaEPCTest.cpp llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp llvm/unittests/ExecutionEngine/Orc/EPCGenericMemoryAccessTest.cpp llvm/unittests/ExecutionEngine/Orc/ExecutionSessionWrapperFunctionCallsTest.cpp llvm/unittests/ExecutionEngine/Orc/MemoryMapperTest.cpp llvm/unittests/ExecutionEngine/Orc/SharedMemoryMapperTest.cpp llvm/unittests/ExecutionEngine/Orc/SimpleExecutorMemoryManagerTest.cpp llvm/unittests/ExecutionEngine/Orc/WrapperFunctionUtilsTest.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/Core.h b/llvm/include/llvm/ExecutionEngine/Orc/Core.h
index 4ca63857a..37539dd5a 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/Core.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/Core.h
@@ -1352,7 +1352,8 @@ public:
using ErrorReporter = unique_function<void(Error)>;
/// Send a result to the remote.
- using SendResultFunction = unique_function<void(shared::WrapperFunctionBuffer)>;
+ using SendResultFunction =
+ unique_function<void(shared::WrapperFunctionBuffer)>;
/// An asynchronous wrapper-function callable from the executor via
/// jit-dispatch.
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h b/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
index 379f8e42d..3a5f461a8 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
@@ -38,7 +38,6 @@ class ExecutionSession;
class LLVM_ABI ExecutorProcessControl {
friend class ExecutionSession;
public:
-
/// A handler or incoming WrapperFunctionBuffers -- either return values from
/// callWrapper* calls, or incoming JIT-dispatch requests.
///
@@ -51,6 +50,7 @@ public:
IncomingWFRHandler() = default;
explicit operator bool() const { return !!H; }
void operator()(shared::WrapperFunctionBuffer WFR) { H(std::move(WFR)); }
+
private:
template <typename FnT> IncomingWFRHandler(FnT &&Fn)
: H(std::forward<FnT>(Fn)) {}
@@ -83,15 +83,14 @@ public:
template <typename FnT>
IncomingWFRHandler operator()(FnT &&Fn) {
- return IncomingWFRHandler(
- [&D = this->D, Fn = std::move(Fn)]
- (shared::WrapperFunctionBuffer WFR) mutable {
- D.dispatch(
- makeGenericNamedTask(
- [Fn = std::move(Fn), WFR = std::move(WFR)]() mutable {
- Fn(std::move(WFR));
- }, "WFR handler task"));
- });
+ return IncomingWFRHandler([&D = this->D, Fn = std::move(Fn)](
+ shared::WrapperFunctionBuffer WFR) mutable {
+ D.dispatch(makeGenericNamedTask(
+ [Fn = std::move(Fn), WFR = std::move(WFR)]() mutable {
+ Fn(std::move(WFR));
+ },
+ "WFR handler task"));
+ });
}
private:
TaskDispatcher &D;
@@ -255,9 +254,8 @@ public:
auto RF = RP.get_future();
callWrapperAsync(
RunInPlace(), WrapperFnAddr,
- [&](shared::WrapperFunctionBuffer R) {
- RP.set_value(std::move(R));
- }, ArgBuffer);
+ [&](shared::WrapperFunctionBuffer R) { RP.set_value(std::move(R)); },
+ ArgBuffer);
return RF.get();
}
diff --git a/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp b/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp
index 772aa99d8..043d53de3 100644
--- a/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp
@@ -313,8 +313,7 @@ Error SimpleRemoteEPC::setup(Setup S) {
// Prepare a handler for the setup packet.
PendingCallWrapperResults[0] =
- RunInPlace()(
- [&](shared::WrapperFunctionBuffer SetupMsgBytes) {
+ RunInPlace()([&](shared::WrapperFunctionBuffer SetupMsgBytes) {
if (const char *ErrMsg = SetupMsgBytes.getOutOfBandError()) {
EIP.set_value(
make_error<StringError>(ErrMsg, inconvertibleErrorCode()));
``````````
</details>
https://github.com/llvm/llvm-project/pull/172633
More information about the llvm-commits
mailing list