Lang Hames 612d80348f
[orc-rt] Move SPS controller interface funcs into their own headers. (#186991)
This provides clean separation between the ORC runtime code that
implements runtime functionality and the wrapper functions that permit
this code to be called from the controller via the
ExecutorProcessControl API.

Separating the controller interface from the implementation functions
should allow clients to introduce alternative serialization schemes if
they want (e.g. JSON).

In particular, this commit adds a new orc-rt/include/orc-rt/sps-ci
directory and moves SimpleNativeMemoryMap SPS controller interface into
a new header in that directory. This commit also splits the
implementation and testing of the SPS controller interface for
SimpleNativeMemoryMap into separate files.
2026-03-17 21:39:09 +11:00

29 lines
839 B
C++

//===- AllSPSCI.cpp -------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// Implementation of sps_ci::addAll.
//
//===----------------------------------------------------------------------===//
#include "orc-rt/sps-ci/AllSPSCI.h"
namespace orc_rt::sps_ci {
Error addAll(ControllerInterface &CI) {
using AdderFn = Error (*)(ControllerInterface &);
AdderFn Adders[] = {addSimpleNativeMemoryMap};
for (auto *Adder : Adders)
if (auto Err = Adder(CI))
return Err;
return Error::success();
}
} // namespace orc_rt::sps_ci