mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
b1b5778822
Add infrastructure to pypeline to allow for pipes to provide custom invalidation, by implementing an `invalidate` function.
39 lines
1.3 KiB
C++
39 lines
1.3 KiB
C++
#pragma once
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "nanobind/nanobind.h"
|
|
|
|
#include "revng/PipeboxCommon/Common.h"
|
|
#include "revng/PipeboxCommon/Helpers/PipeRunner.h"
|
|
#include "revng/PipeboxCommon/Helpers/Python/Helpers.h"
|
|
#include "revng/PipeboxCommon/Model.h"
|
|
|
|
namespace revng::pypeline::helpers::python {
|
|
|
|
template<typename T>
|
|
inline PipeOutput runPipe(T &Handle,
|
|
nanobind::object FileStorage,
|
|
nanobind::object TheModel,
|
|
nanobind::list Containers,
|
|
Request Incoming,
|
|
Request Outgoing,
|
|
llvm::StringRef Configuration) {
|
|
const Model &CppModel = convertReadOnlyModel(TheModel);
|
|
auto ContainerTuple = containerVectorToTuple<T>(Containers);
|
|
|
|
{
|
|
nanobind::gil_scoped_release X;
|
|
return revng::pypeline::helpers::runPipe(Handle,
|
|
CppModel,
|
|
Incoming,
|
|
Outgoing,
|
|
Configuration,
|
|
ContainerTuple);
|
|
}
|
|
}
|
|
|
|
} // namespace revng::pypeline::helpers::python
|