clang 20.0.0git
SemaWasm.h
Go to the documentation of this file.
1//===----- SemaWasm.h ------ Wasm target-specific routines ----*- 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/// \file
9/// This file declares semantic analysis functions specific to Wasm.
10///
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CLANG_SEMA_SEMAWASM_H
14#define LLVM_CLANG_SEMA_SEMAWASM_H
15
16#include "clang/AST/Attr.h"
17#include "clang/AST/DeclBase.h"
18#include "clang/AST/Expr.h"
21#include "clang/Sema/SemaBase.h"
22
23namespace clang {
24class SemaWasm : public SemaBase {
25public:
26 SemaWasm(Sema &S);
27
29 unsigned BuiltinID,
30 CallExpr *TheCall);
31
33 bool BuiltinWasmRefNullFunc(CallExpr *TheCall);
34 bool BuiltinWasmTableGet(CallExpr *TheCall);
35 bool BuiltinWasmTableSet(CallExpr *TheCall);
36 bool BuiltinWasmTableSize(CallExpr *TheCall);
37 bool BuiltinWasmTableGrow(CallExpr *TheCall);
38 bool BuiltinWasmTableFill(CallExpr *TheCall);
39 bool BuiltinWasmTableCopy(CallExpr *TheCall);
40
41 WebAssemblyImportNameAttr *
42 mergeImportNameAttr(Decl *D, const WebAssemblyImportNameAttr &AL);
43 WebAssemblyImportModuleAttr *
44 mergeImportModuleAttr(Decl *D, const WebAssemblyImportModuleAttr &AL);
45
49};
50} // namespace clang
51
52#endif // LLVM_CLANG_SEMA_SEMAWASM_H
const Decl * D
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2830
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:86
ParsedAttr - Represents a syntactic attribute.
Definition: ParsedAttr.h:129
void handleWebAssemblyImportNameAttr(Decl *D, const ParsedAttr &AL)
Definition: SemaWasm.cpp:302
bool BuiltinWasmRefNullExtern(CallExpr *TheCall)
Definition: SemaWasm.cpp:54
bool CheckWebAssemblyBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall)
Definition: SemaWasm.cpp:219
bool BuiltinWasmTableGet(CallExpr *TheCall)
Check that the first argument is a WebAssembly table, and the second is an index to use as index into...
Definition: SemaWasm.cpp:86
bool BuiltinWasmTableFill(CallExpr *TheCall)
Check that the first argument is a WebAssembly table, the second is an integer, the third is the valu...
Definition: SemaWasm.cpp:165
bool BuiltinWasmTableSize(CallExpr *TheCall)
Check that the argument is a WebAssembly table.
Definition: SemaWasm.cpp:127
void handleWebAssemblyImportModuleAttr(Decl *D, const ParsedAttr &AL)
Definition: SemaWasm.cpp:285
bool BuiltinWasmRefNullFunc(CallExpr *TheCall)
Definition: SemaWasm.cpp:63
bool BuiltinWasmTableSet(CallExpr *TheCall)
Check that the first argumnet is a WebAssembly table, the second is an index to use as index into the...
Definition: SemaWasm.cpp:109
void handleWebAssemblyExportNameAttr(Decl *D, const ParsedAttr &AL)
Definition: SemaWasm.cpp:318
WebAssemblyImportNameAttr * mergeImportNameAttr(Decl *D, const WebAssemblyImportNameAttr &AL)
Definition: SemaWasm.cpp:266
WebAssemblyImportModuleAttr * mergeImportModuleAttr(Decl *D, const WebAssemblyImportModuleAttr &AL)
Definition: SemaWasm.cpp:245
bool BuiltinWasmTableGrow(CallExpr *TheCall)
Check that the first argument is a WebAssembly table, the second is the value to use for new elements...
Definition: SemaWasm.cpp:141
bool BuiltinWasmTableCopy(CallExpr *TheCall)
Check that the first argument is a WebAssembly table, the second is also a WebAssembly table (of the ...
Definition: SemaWasm.cpp:192
Sema - This implements semantic analysis and AST building for C.
Definition: Sema.h:535
Exposes information about the current target.
Definition: TargetInfo.h:218
Defines the clang::TargetInfo interface.
The JSON file list parser is used to communicate input to InstallAPI.