diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 2c5308fbcb319a..0e3f7cf89ca885 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -742,10 +742,10 @@ AIX Support WebAssembly Support ^^^^^^^^^^^^^^^^^^^ -The -mcpu=generic configuration now enables multivalue and reference-types.These -proposals are standardized and available in all major engines. Enabling -multivalue here only enables the language feature but does not turn on the -multivalue ABI (this enables non-ABI uses of multivalue, like exnref). +The -mcpu=generic configuration now enables multivalue feature, which is +standardized and available in all major engines. Enabling multivalue here only +enables the language feature but does not turn on the multivalue ABI (this +enables non-ABI uses of multivalue, like exnref). AVR Support ^^^^^^^^^^^ diff --git a/clang/lib/Basic/Targets/WebAssembly.cpp b/clang/lib/Basic/Targets/WebAssembly.cpp index 1f0418b21c1f86..a6d820e108088f 100644 --- a/clang/lib/Basic/Targets/WebAssembly.cpp +++ b/clang/lib/Basic/Targets/WebAssembly.cpp @@ -153,7 +153,6 @@ bool WebAssemblyTargetInfo::initFeatureMap( auto addGenericFeatures = [&]() { Features["multivalue"] = true; Features["mutable-globals"] = true; - Features["reference-types"] = true; Features["sign-ext"] = true; }; auto addBleedingEdgeFeatures = [&]() { @@ -162,6 +161,7 @@ bool WebAssemblyTargetInfo::initFeatureMap( Features["bulk-memory"] = true; Features["multimemory"] = true; Features["nontrapping-fptoint"] = true; + Features["reference-types"] = true; Features["tail-call"] = true; Features["half-precision"] = true; setSIMDLevel(Features, SIMD128, true); diff --git a/clang/test/Preprocessor/wasm-target-features.c b/clang/test/Preprocessor/wasm-target-features.c index 72ecc60a6e7898..5a4f85461d5aa2 100644 --- a/clang/test/Preprocessor/wasm-target-features.c +++ b/clang/test/Preprocessor/wasm-target-features.c @@ -164,7 +164,6 @@ // // GENERIC-INCLUDE-DAG: #define __wasm_multivalue__ 1{{$}} // GENERIC-INCLUDE-DAG: #define __wasm_mutable_globals__ 1{{$}} -// GENERIC-INCLUDE-DAG: #define __wasm_reference_types__ 1{{$}} // GENERIC-INCLUDE-DAG: #define __wasm_sign_ext__ 1{{$}} // // RUN: %clang -E -dM %s -o - 2>&1 \ @@ -181,6 +180,7 @@ // GENERIC-NOT: #define __wasm_half_precision__ 1{{$}} // GENERIC-NOT: #define __wasm_multimemory__ 1{{$}} // GENERIC-NOT: #define __wasm_nontrapping_fptoint__ 1{{$}} +// GENERIC-NOT: #define __wasm_reference_types__ 1{{$}} // GENERIC-NOT: #define __wasm_relaxed_simd__ 1{{$}} // GENERIC-NOT: #define __wasm_simd128__ 1{{$}} // GENERIC-NOT: #define __wasm_tail_call__ 1{{$}}