mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
296eb9a76f
Make the interface required by `SingleOutputPipe` similar to other piperuns by requiring a constructor, the use of `PipeRunArgument`s and the implementation of a non-static `run` function.
45 lines
1.7 KiB
C++
45 lines
1.7 KiB
C++
#pragma once
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "revng/PipeboxCommon/LLVMContainer.h"
|
|
|
|
namespace revng::pypeline::piperuns {
|
|
|
|
class InvokeIsolatedFunctions {
|
|
private:
|
|
const model::Binary &Binary;
|
|
const LLVMRootContainer &Root;
|
|
const LLVMFunctionContainer &Functions;
|
|
LLVMRootContainer &Output;
|
|
|
|
public:
|
|
static constexpr llvm::StringRef Name = "invoke-isolated-functions";
|
|
using Arguments = TypeList<PipeRunArgument<const LLVMRootContainer,
|
|
"RootModule",
|
|
"Root module containing the root "
|
|
"function">,
|
|
PipeRunArgument<const LLVMFunctionContainer,
|
|
"FunctionModules",
|
|
"LLVM Modules containing isolated "
|
|
"functions">,
|
|
PipeRunArgument<LLVMRootContainer,
|
|
"Output",
|
|
"Output LLVM Module with root, "
|
|
"functions and dispatcher",
|
|
Access::Write>>;
|
|
|
|
InvokeIsolatedFunctions(const class Model &Model,
|
|
llvm::StringRef Config,
|
|
llvm::StringRef DynamicConfig,
|
|
const LLVMRootContainer &Root,
|
|
const LLVMFunctionContainer &Functions,
|
|
LLVMRootContainer &Output);
|
|
|
|
void run();
|
|
};
|
|
|
|
} // namespace revng::pypeline::piperuns
|