clang 22.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/ASTFwd.h"
17#include "clang/Sema/SemaBase.h"
18
19namespace clang {
20class ParsedAttr;
21class TargetInfo;
22
23class SemaWasm : public SemaBase {
24public:
25 SemaWasm(Sema &S);
26
28 unsigned BuiltinID,
29 CallExpr *TheCall);
30
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);
41 CallExpr *TheCall);
42
43 WebAssemblyImportNameAttr *
44 mergeImportNameAttr(Decl *D, const WebAssemblyImportNameAttr &AL);
45 WebAssemblyImportModuleAttr *
46 mergeImportModuleAttr(Decl *D, const WebAssemblyImportModuleAttr &AL);
47
51};
52} // namespace clang
53
54#endif // LLVM_CLANG_SEMA_SEMAWASM_H
Forward declaration of all AST node types.
const Decl * D
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2879
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:86
ParsedAttr - Represents a syntactic attribute.
Definition: ParsedAttr.h:119
void handleWebAssemblyImportNameAttr(Decl *D, const ParsedAttr &AL)
Definition: SemaWasm.cpp:370
bool BuiltinWasmRefNullExtern(CallExpr *TheCall)
Definition: SemaWasm.cpp:55
bool CheckWebAssemblyBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall)
Definition: SemaWasm.cpp:283
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:98
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:177
bool BuiltinWasmTableSize(CallExpr *TheCall)
Check that the argument is a WebAssembly table.
Definition: SemaWasm.cpp:139
void handleWebAssemblyImportModuleAttr(Decl *D, const ParsedAttr &AL)
Definition: SemaWasm.cpp:353
bool BuiltinWasmRefNullFunc(CallExpr *TheCall)
Definition: SemaWasm.cpp:79
bool BuiltinWasmTestFunctionPointerSignature(const TargetInfo &TI, CallExpr *TheCall)
Definition: SemaWasm.cpp:231
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:121
bool BuiltinWasmRefIsNullExtern(CallExpr *TheCall)
Definition: SemaWasm.cpp:63
void handleWebAssemblyExportNameAttr(Decl *D, const ParsedAttr &AL)
Definition: SemaWasm.cpp:386
WebAssemblyImportNameAttr * mergeImportNameAttr(Decl *D, const WebAssemblyImportNameAttr &AL)
Definition: SemaWasm.cpp:334
WebAssemblyImportModuleAttr * mergeImportModuleAttr(Decl *D, const WebAssemblyImportModuleAttr &AL)
Definition: SemaWasm.cpp:313
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:153
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:204
Sema - This implements semantic analysis and AST building for C.
Definition: Sema.h:850
Exposes information about the current target.
Definition: TargetInfo.h:226
The JSON file list parser is used to communicate input to InstallAPI.