summaryrefslogtreecommitdiff
path: root/test/Preprocessor/wasm-target-features.c
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2019-03-29 22:00:18 +0000
committerThomas Lively <tlively@google.com>2019-03-29 22:00:18 +0000
commited9234835496bbbc16765e64e13dd34d2703ca33 (patch)
tree7358473030ce26d3edc43d15a947bef0950fc20f /test/Preprocessor/wasm-target-features.c
parent0cf9ba250e8ec340f5dc0fda616024e0a59f2f1d (diff)
downloadclang-ed9234835496bbbc16765e64e13dd34d2703ca33.tar.gz
[WebAssembly] Add mutable globals feature
Summary: This feature is not actually used for anything in the WebAssembly backend, but adding it allows users to get it into the target features sections of their objects, which makes these objects future-compatible. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, jdoerfert, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D60013 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357321 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/wasm-target-features.c')
-rw-r--r--test/Preprocessor/wasm-target-features.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Preprocessor/wasm-target-features.c b/test/Preprocessor/wasm-target-features.c
index d32c1b00be..2bf94398a1 100644
--- a/test/Preprocessor/wasm-target-features.c
+++ b/test/Preprocessor/wasm-target-features.c
@@ -71,6 +71,15 @@
// PTHREAD:#define __wasm_atomics__ 1{{$}}
// RUN: %clang -E -dM %s -o - 2>&1 \
+// RUN: -target wasm32-unknown-unknown -mmutable-globals \
+// RUN: | FileCheck %s -check-prefix=MUTABLE-GLOBALS
+// RUN: %clang -E -dM %s -o - 2>&1 \
+// RUN: -target wasm64-unknown-unknown -mmutable-globals \
+// RUN: | FileCheck %s -check-prefix=MUTABLE-GLOBALS
+//
+// MUTABLE-GLOBALS:#define __wasm_mutable_globals__ 1{{$}}
+
+// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -mcpu=mvp \
// RUN: | FileCheck %s -check-prefix=MVP
// RUN: %clang -E -dM %s -o - 2>&1 \
@@ -84,6 +93,7 @@
// MVP-NOT:#define __wasm_exception_handling__
// MVP-NOT:#define __wasm_bulk_memory__
// MVP-NOT:#define __wasm_atomics__
+// MVP-NOT:#define __wasm_mutable_globals__
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -mcpu=bleeding-edge \
@@ -96,6 +106,7 @@
// BLEEDING-EDGE-DAG:#define __wasm_sign_ext__ 1{{$}}
// BLEEDING-EDGE-DAG:#define __wasm_simd128__ 1{{$}}
// BLEEDING-EDGE-DAG:#define __wasm_atomics__ 1{{$}}
+// BLEEDING-EDGE-DAG:#define __wasm_mutable_globals__ 1{{$}}
// BLEEDING-EDGE-NOT:#define __wasm_unimplemented_simd128__ 1{{$}}
// RUN: %clang -E -dM %s -o - 2>&1 \