clang  20.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 
20 #include "IncrementalExecutor.h"
21 
22 namespace clang {
23 
25 public:
26  WasmIncrementalExecutor(llvm::orc::ThreadSafeContext &TSC);
27 
28  llvm::Error addModule(PartialTranslationUnit &PTU) override;
29  llvm::Error removeModule(PartialTranslationUnit &PTU) override;
30  llvm::Error runCtors() const override;
31 
33 };
34 
35 } // namespace clang
36 
37 #endif // LLVM_CLANG_LIB_INTERPRETER_WASM_H
llvm::Error addModule(PartialTranslationUnit &PTU) override
Definition: Wasm.cpp:40
llvm::Error runCtors() const override
Definition: Wasm.cpp:107
llvm::Error removeModule(PartialTranslationUnit &PTU) override
Definition: Wasm.cpp:102
WasmIncrementalExecutor(llvm::orc::ThreadSafeContext &TSC)
Definition: Wasm.cpp:36
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.