Coverage Report

Created: 2025-07-01 06:18

/src/WasmEdge/include/llvm/codegen.h
Line
Count
Source
1
// SPDX-License-Identifier: Apache-2.0
2
// SPDX-FileCopyrightText: 2019-2024 Second State INC
3
4
//===-- wasmedge/llvm/codegen.h - Code Generator class definition ---------===//
5
//
6
// Part of the WasmEdge Project.
7
//
8
//===----------------------------------------------------------------------===//
9
///
10
/// \file
11
/// This file is the definition class of Compiler class.
12
///
13
//===----------------------------------------------------------------------===//
14
#pragma once
15
16
#include "ast/module.h"
17
#include "common/configure.h"
18
#include "common/errcode.h"
19
#include "common/filesystem.h"
20
#include "common/span.h"
21
#include "llvm/data.h"
22
23
#include <mutex>
24
25
namespace WasmEdge::LLVM {
26
27
/// Compiling LLVM Module into loadable executable binary.
28
class CodeGen {
29
public:
30
2.14k
  CodeGen(const Configure &Conf) noexcept : Conf(Conf) {}
31
  Expect<void> codegen(Span<const Byte> WasmData, Data D,
32
                       std::filesystem::path OutputPath) noexcept;
33
34
private:
35
  const Configure Conf;
36
};
37
38
} // namespace WasmEdge::LLVM