diff options
author | Paulo Matos <pmatos@igalia.com> | 2023-01-09 15:15:12 +0100 |
---|---|---|
committer | Paulo Matos <pmatos@igalia.com> | 2023-01-31 17:34:01 +0100 |
commit | eb66833d19573df97034a81279eda31b8d19815b (patch) | |
tree | fd42f2041cac031d7c0778cde3016a644b618e2d /clang/lib/Serialization/ASTCommon.cpp | |
parent | 48b5a06dfcab12cf093a1a3df42cb5b684e2be4c (diff) | |
download | llvm-eb66833d19573df97034a81279eda31b8d19815b.zip llvm-eb66833d19573df97034a81279eda31b8d19815b.tar.gz llvm-eb66833d19573df97034a81279eda31b8d19815b.tar.bz2 |
[clang][WebAssembly] Initial support for reference type externref in clang
This patch introduces a new type __externref_t that denotes a WebAssembly opaque
reference type. It also implements builtin __builtin_wasm_ref_null_extern(),
that returns a null value of __externref_t. This lays the ground work
for further builtins and reference types.
Differential Revision: https://reviews.llvm.org/D122215
Diffstat (limited to 'clang/lib/Serialization/ASTCommon.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTCommon.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTCommon.cpp b/clang/lib/Serialization/ASTCommon.cpp index 96bc47d..252cdbb 100644 --- a/clang/lib/Serialization/ASTCommon.cpp +++ b/clang/lib/Serialization/ASTCommon.cpp @@ -250,6 +250,11 @@ serialization::TypeIdxFromBuiltin(const BuiltinType *BT) { ID = PREDEF_TYPE_##Id##_ID; \ break; #include "clang/Basic/RISCVVTypes.def" +#define WASM_TYPE(Name, Id, SingletonId) \ + case BuiltinType::Id: \ + ID = PREDEF_TYPE_##Id##_ID; \ + break; +#include "clang/Basic/WebAssemblyReferenceTypes.def" case BuiltinType::BuiltinFn: ID = PREDEF_TYPE_BUILTIN_FN; break; |