clang 23.0.0git
Wasm.h
Go to the documentation of this file.
1//===------------------ Wasm.h - Wasm Interpreter ---------------*- 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// This file implements interpreter support for code execution in WebAssembly.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CLANG_LIB_INTERPRETER_WASM_H
14#define LLVM_CLANG_LIB_INTERPRETER_WASM_H
15
16#ifndef __EMSCRIPTEN__
17#error "This requires emscripten."
18#endif // __EMSCRIPTEN__
19
21#include "llvm/ADT/SmallString.h"
22
23namespace clang {
24
26public:
27 WasmIncrementalExecutor(llvm::Error &Err);
29
30 llvm::Error addModule(PartialTranslationUnit &PTU) override;
31 llvm::Error removeModule(PartialTranslationUnit &PTU) override;
32 llvm::Error runCtors() const override;
33 llvm::Error cleanUp() override;
35 getSymbolAddress(llvm::StringRef Name,
36 SymbolNameKind NameKind) const override;
37 llvm::Error LoadDynamicLibrary(const char *name) override;
38
39private:
41};
42
43} // namespace clang
44
45#endif // LLVM_CLANG_LIB_INTERPRETER_WASM_H
llvm::Expected< llvm::orc::ExecutorAddr > getSymbolAddress(llvm::StringRef Name, SymbolNameKind NameKind) const override
Definition Wasm.cpp:168
llvm::Error addModule(PartialTranslationUnit &PTU) override
Definition Wasm.cpp:78
llvm::Error runCtors() const override
Definition Wasm.cpp:156
WasmIncrementalExecutor(llvm::Error &Err)
Definition Wasm.cpp:62
llvm::Error LoadDynamicLibrary(const char *name) override
Definition Wasm.cpp:180
llvm::Error removeModule(PartialTranslationUnit &PTU) override
Definition Wasm.cpp:151
llvm::Error cleanUp() override
Definition Wasm.cpp:161
The JSON file list parser is used to communicate input to InstallAPI.
The class keeps track of various objects created as part of processing incremental inputs.