Skip to content

Commit e98789d

Browse files
committed
Add wasm32-wasip{1,2,3} tests to clang/test/Preprocessor/init.c.
1 parent 8afaf34 commit e98789d

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

clang/test/Preprocessor/init.c

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,12 +1656,24 @@
16561656
// RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm64-emscripten \
16571657
// RUN: < /dev/null \
16581658
// RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY64,EMSCRIPTEN %s
1659-
// RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm32-wasi \
1659+
// RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm32-wasip1 \
16601660
// RUN: < /dev/null \
1661-
// RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY32,WEBASSEMBLY-WASI %s
1662-
// RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm64-wasi \
1661+
// RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY32,WASI,WASIP1 %s
1662+
// RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm64-wasip1 \
16631663
// RUN: < /dev/null \
1664-
// RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY64,WEBASSEMBLY-WASI %s
1664+
// RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY64,WASI,WASIP1 %s
1665+
// RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm32-wasip2 \
1666+
// RUN: < /dev/null \
1667+
// RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY32,WASI,WASIP2 %s
1668+
// RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm64-wasip2 \
1669+
// RUN: < /dev/null \
1670+
// RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY64,WASI,WASIP2 %s
1671+
// RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm32-wasip3 \
1672+
// RUN: < /dev/null \
1673+
// RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY32,WASI,WASIP3 %s
1674+
// RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm64-wasip3 \
1675+
// RUN: < /dev/null \
1676+
// RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY64,WASI,WASIP3 %s
16651677
// RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=wasm32-unknown-unknown -x c++ \
16661678
// RUN: < /dev/null \
16671679
// RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY-CXX %s
@@ -2079,11 +2091,14 @@
20792091
// WEBASSEMBLY-NEXT:#define __clang_version__ "{{.*}}"
20802092
// WEBASSEMBLY-NEXT:#define __clang_wide_literal_encoding__ {{.*}}
20812093
// WEBASSEMBLY-NEXT:#define __llvm__ 1
2082-
// WEBASSEMBLY-WASI-NOT:#define __unix
2083-
// WEBASSEMBLY-WASI-NOT:#define __unix__
2094+
// WASI-NOT:#define __unix
2095+
// WASI-NOT:#define __unix__
20842096
// EMSCRIPTEN-NEXT:#define __unix 1
20852097
// EMSCRIPTEN-NEXT:#define __unix__ 1
2086-
// WEBASSEMBLY-WASI-NEXT:#define __wasi__ 1
2098+
// WASI-NEXT:#define __wasi__ 1
2099+
// WASIP1-NEXT:#define __wasip1__ 1
2100+
// WASIP2-NEXT:#define __wasip2__ 1
2101+
// WASIP3-NEXT:#define __wasip3__ 1
20872102
// WEBASSEMBLY-NOT:#define __wasm_simd128__
20882103
// WEBASSEMBLY-NOT:#define __wasm_simd256__
20892104
// WEBASSEMBLY-NOT:#define __wasm_simd512__
@@ -2098,7 +2113,7 @@
20982113
// WEBASSEMBLY64-NEXT:#define __wasm64__ 1
20992114
// WEBASSEMBLY-NEXT:#define __wasm__ 1
21002115
// EMSCRIPTEN:#define unix 1
2101-
// WEBASSEMBLY-WASI-NOT:#define unix 1
2116+
// WASI-NOT:#define unix 1
21022117
// WEBASSEMBLY-CXX-NOT:_REENTRANT
21032118
// WEBASSEMBLY-CXX-NOT:__STDCPP_THREADS__
21042119
// WEBASSEMBLY-CXX-ATOMICS:#define _REENTRANT 1

0 commit comments

Comments
 (0)