LLVM 19.0.0git
ObjectTransformLayer.h
Go to the documentation of this file.
1//===- ObjectTransformLayer.h - Run all objects through functor -*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Run all objects passed in through a user supplied functor.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_EXECUTIONENGINE_ORC_OBJECTTRANSFORMLAYER_H
14#define LLVM_EXECUTIONENGINE_ORC_OBJECTTRANSFORMLAYER_H
15
18#include <algorithm>
19#include <memory>
20
21namespace llvm {
22namespace orc {
23
25 : public RTTIExtends<ObjectTransformLayer, ObjectLayer> {
26public:
27 static char ID;
28
30 std::function<Expected<std::unique_ptr<MemoryBuffer>>(
31 std::unique_ptr<MemoryBuffer>)>;
32
35
36 void emit(std::unique_ptr<MaterializationResponsibility> R,
37 std::unique_ptr<MemoryBuffer> O) override;
38
40 this->Transform = std::move(Transform);
41 }
42
43private:
44 ObjectLayer &BaseLayer;
45 TransformFunction Transform;
46};
47
48} // end namespace orc
49} // end namespace llvm
50
51#endif // LLVM_EXECUTIONENGINE_ORC_OBJECTTRANSFORMLAYER_H
dxil metadata emit
Inheritance utility for extensible RTTI.
An ExecutionSession represents a running JIT program.
Definition: Core.h:1425
Interface for Layers that accept object files.
Definition: Layer.h:133
std::function< Expected< std::unique_ptr< MemoryBuffer > >(std::unique_ptr< MemoryBuffer >)> TransformFunction
void setTransform(TransformFunction Transform)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18