blob: fd250128a76e627677d7d3609dc4d568342cd231 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef RCC_TARGET_RISCV_RISCVOBJECTFILE_H
#define RCC_TARGET_RISCV_RISCVOBJECTFILE_H
#include "rcc/CodeGen/TargetDescription.h"
#include "rcc/Support/Error.h"
#include <cstdint>
#include <vector>
namespace rcc {
class CompilationUnit;
class MachineFunction;
} // namespace rcc
namespace rcc::riscv {
struct ObjectEmissionOptions final {
bool EmitFunctionDirectives = true;
bool EmitCFI = true;
bool EmitBlockLabels = true;
bool VerifyInput = true;
};
[[nodiscard]] Expected<std::vector<std::uint8_t>> emitObject(const CompilationUnit &Unit,
const TargetDescription &Target,
ObjectEmissionOptions Options = {});
[[nodiscard]] Expected<std::vector<std::uint8_t>> emitObject(const MachineFunction &Function,
const TargetDescription &Target,
ObjectEmissionOptions Options = {});
} // namespace rcc::riscv
#endif // RCC_TARGET_RISCV_RISCVOBJECTFILE_H
|