summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/BuiltinsWebAssembly.def
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2018-06-01 00:05:51 +0000
committerDan Gohman <dan433584@gmail.com>2018-06-01 00:05:51 +0000
commit8c75735104dd7047ad60ee93559d40485d94156a (patch)
treeab0ef53da7e964d13f41da6c6198e0edc5f6b9e6 /include/clang/Basic/BuiltinsWebAssembly.def
parentd8cadd200135a319ef1a7ec2b7cabe210cfb3343 (diff)
[WebAssembly] Update to the new names for the memory builtin functions.
The WebAssembly committee has decided on the names `memory.size` and `memory.grow` for the memory intrinsics, so update the clang builtin functions to follow those names, keeping both sets of old names in place for compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@333712 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/BuiltinsWebAssembly.def')
-rw-r--r--include/clang/Basic/BuiltinsWebAssembly.def13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/clang/Basic/BuiltinsWebAssembly.def b/include/clang/Basic/BuiltinsWebAssembly.def
index 95b520ac09..b3d877dced 100644
--- a/include/clang/Basic/BuiltinsWebAssembly.def
+++ b/include/clang/Basic/BuiltinsWebAssembly.def
@@ -17,15 +17,16 @@
// The format of this database matches clang/Basic/Builtins.def.
// Query the current memory size, and increase the current memory size.
-// Note that mem.size is not "c" (readnone) because it must be sequenced
-// with respect to grow_memory calls.
-// These are the new proposed names, which aren't yet official. Use at your own
-// risk.
+// Note that memory.size is not "c" (readnone) because it must be sequenced
+// with respect to memory.grow calls.
+BUILTIN(__builtin_wasm_memory_size, "zIi", "n")
+BUILTIN(__builtin_wasm_memory_grow, "zIiz", "n")
+
+// These are the old names.
BUILTIN(__builtin_wasm_mem_size, "zIi", "n")
BUILTIN(__builtin_wasm_mem_grow, "zIiz", "n")
-// These are the existing names, which are currently official, but expected
-// to be deprecated in the future. They also lack the immediate field.
+// These are the old old names. They also lack the immediate field.
BUILTIN(__builtin_wasm_current_memory, "z", "n")
BUILTIN(__builtin_wasm_grow_memory, "zz", "n")