[clang] 1491282 - [clang] Change cc1 -fvisibility's canonical spelling to -fvisibility=
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 2 11:49:46 PDT 2022
Author: Fangrui Song
Date: 2022-09-02T11:49:38-07:00
New Revision: 1491282165bfb87b15bd806ab53b3e9910ee7b29
URL: https://github.com/llvm/llvm-project/commit/1491282165bfb87b15bd806ab53b3e9910ee7b29
DIFF: https://github.com/llvm/llvm-project/commit/1491282165bfb87b15bd806ab53b3e9910ee7b29.diff
LOG: [clang] Change cc1 -fvisibility's canonical spelling to -fvisibility=
Added:
Modified:
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/AMDGPU.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/HIPAMD.cpp
clang/lib/Driver/ToolChains/HIPSPV.cpp
clang/test/CodeGenCXX/visibility-ms-compat.cpp
clang/test/Driver/amdgpu-visibility.cl
clang/test/Driver/clang-translation.c
clang/test/Driver/hip-rdc-device-only.hip
clang/test/Driver/hip-toolchain-no-rdc.hip
clang/test/Driver/hip-toolchain-rdc-separate.hip
clang/test/Driver/hip-toolchain-rdc.hip
clang/test/Driver/hipspv-toolchain-rdc.hip
clang/test/Driver/visibility.cpp
clang/test/Driver/wasm-toolchain.c
clang/test/Driver/wasm-toolchain.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 9949f903ae6f9..6d08a27c60037 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -2952,8 +2952,9 @@ def fvisibility_externs_nodllstorageclass_EQ : Joined<["-"], "fvisibility-extern
HelpText<"The visibility for external declarations without an explicit DLL dllstorageclass [-fvisibility-from-dllstorageclass]">,
MarshallingInfoVisibility<LangOpts<"ExternDeclNoDLLStorageClassVisibility">, "HiddenVisibility">,
ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>;
-def fvisibility_EQ : Joined<["-"], "fvisibility=">, Group<f_Group>,
- HelpText<"Set the default symbol visibility for all global definitions">, Values<"default,protected,internal,hidden">;
+def fvisibility_EQ : Joined<["-"], "fvisibility=">, Group<f_Group>, Flags<[CC1Option]>,
+ HelpText<"Set the default symbol visibility for all global definitions">,
+ MarshallingInfoVisibility<LangOpts<"ValueVisibilityMode">, "DefaultVisibility">;
defm visibility_inlines_hidden : BoolFOption<"visibility-inlines-hidden",
LangOpts<"InlineVisibilityHidden">, DefaultFalse,
PosFlag<SetTrue, [CC1Option], "Give inline C++ member functions hidden visibility by default">,
@@ -6065,12 +6066,10 @@ def stack_protector : Separate<["-"], "stack-protector">,
def stack_protector_buffer_size : Separate<["-"], "stack-protector-buffer-size">,
HelpText<"Lower bound for a buffer to be considered for stack protection">,
MarshallingInfoInt<CodeGenOpts<"SSPBufferSize">, "8">;
-def fvisibility : Separate<["-"], "fvisibility">,
- HelpText<"Default type and symbol visibility">,
- MarshallingInfoVisibility<LangOpts<"ValueVisibilityMode">, "DefaultVisibility">;
-def ftype_visibility : Separate<["-"], "ftype-visibility">,
+def : Separate<["-"], "fvisibility">, Alias<fvisibility_EQ>;
+def ftype_visibility : Joined<["-"], "ftype-visibility=">,
HelpText<"Default type visibility">,
- MarshallingInfoVisibility<LangOpts<"TypeVisibilityMode">, fvisibility.KeyPath>;
+ MarshallingInfoVisibility<LangOpts<"TypeVisibilityMode">, fvisibility_EQ.KeyPath>;
def fapply_global_visibility_to_externs : Flag<["-"], "fapply-global-visibility-to-externs">,
HelpText<"Apply global symbol visibility to external declarations without an explicit visibility">,
MarshallingInfoFlag<LangOpts<"SetVisibilityForExternDecls">>;
diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp
index 89f8e482ded6f..6246568710916 100644
--- a/clang/lib/Driver/ToolChains/AMDGPU.cpp
+++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp
@@ -707,8 +707,7 @@ void AMDGPUToolChain::addClangTargetOptions(
// supported for the foreseeable future.
if (!DriverArgs.hasArg(options::OPT_fvisibility_EQ,
options::OPT_fvisibility_ms_compat)) {
- CC1Args.push_back("-fvisibility");
- CC1Args.push_back("hidden");
+ CC1Args.push_back("-fvisibility=hidden");
CC1Args.push_back("-fapply-global-visibility-to-externs");
}
}
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index eb7ad39d7edc7..2dd9ac01b3ef9 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -2386,10 +2386,8 @@ void Clang::AddWebAssemblyTargetArgs(const ArgList &Args,
ArgStringList &CmdArgs) const {
// Default to "hidden" visibility.
if (!Args.hasArg(options::OPT_fvisibility_EQ,
- options::OPT_fvisibility_ms_compat)) {
- CmdArgs.push_back("-fvisibility");
- CmdArgs.push_back("hidden");
- }
+ options::OPT_fvisibility_ms_compat))
+ CmdArgs.push_back("-fvisibility=hidden");
}
void Clang::AddVETargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const {
@@ -5982,21 +5980,17 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
if (const Arg *A = Args.getLastArg(options::OPT_fvisibility_EQ,
options::OPT_fvisibility_ms_compat)) {
if (A->getOption().matches(options::OPT_fvisibility_EQ)) {
- CmdArgs.push_back("-fvisibility");
- CmdArgs.push_back(A->getValue());
+ A->render(Args, CmdArgs);
} else {
assert(A->getOption().matches(options::OPT_fvisibility_ms_compat));
- CmdArgs.push_back("-fvisibility");
- CmdArgs.push_back("hidden");
- CmdArgs.push_back("-ftype-visibility");
- CmdArgs.push_back("default");
+ CmdArgs.push_back("-fvisibility=hidden");
+ CmdArgs.push_back("-ftype-visibility=default");
}
} else if (IsOpenMPDevice) {
// When compiling for the OpenMP device we want protected visibility by
// default. This prevents the device from accidentally preempting code on
// the host, makes the system more robust, and improves performance.
- CmdArgs.push_back("-fvisibility");
- CmdArgs.push_back("protected");
+ CmdArgs.push_back("-fvisibility=protected");
}
if (!RawTriple.isPS4())
diff --git a/clang/lib/Driver/ToolChains/HIPAMD.cpp b/clang/lib/Driver/ToolChains/HIPAMD.cpp
index b31077c1fd3b2..35728ffb0b55a 100644
--- a/clang/lib/Driver/ToolChains/HIPAMD.cpp
+++ b/clang/lib/Driver/ToolChains/HIPAMD.cpp
@@ -242,7 +242,7 @@ void HIPAMDToolChain::addClangTargetOptions(
// supported for the foreseeable future.
if (!DriverArgs.hasArg(options::OPT_fvisibility_EQ,
options::OPT_fvisibility_ms_compat)) {
- CC1Args.append({"-fvisibility", "hidden"});
+ CC1Args.append({"-fvisibility=hidden"});
CC1Args.push_back("-fapply-global-visibility-to-externs");
}
diff --git a/clang/lib/Driver/ToolChains/HIPSPV.cpp b/clang/lib/Driver/ToolChains/HIPSPV.cpp
index d68c87e9b3e71..16956e6971ca0 100644
--- a/clang/lib/Driver/ToolChains/HIPSPV.cpp
+++ b/clang/lib/Driver/ToolChains/HIPSPV.cpp
@@ -152,7 +152,7 @@ void HIPSPVToolChain::addClangTargetOptions(
if (!DriverArgs.hasArg(options::OPT_fvisibility_EQ,
options::OPT_fvisibility_ms_compat))
CC1Args.append(
- {"-fvisibility", "hidden", "-fapply-global-visibility-to-externs"});
+ {"-fvisibility=hidden", "-fapply-global-visibility-to-externs"});
llvm::for_each(getHIPDeviceLibs(DriverArgs),
[&](const BitCodeLibraryInfo &BCFile) {
diff --git a/clang/test/CodeGenCXX/visibility-ms-compat.cpp b/clang/test/CodeGenCXX/visibility-ms-compat.cpp
index 1d9cac753ffa6..864817876e828 100644
--- a/clang/test/CodeGenCXX/visibility-ms-compat.cpp
+++ b/clang/test/CodeGenCXX/visibility-ms-compat.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -std=c++11 -triple=x86_64-apple-darwin10 -fvisibility hidden -ftype-visibility default -emit-llvm -o %t
+// RUN: %clang_cc1 %s -std=c++11 -triple=x86_64-apple-darwin10 -fvisibility=hidden -ftype-visibility=default -emit-llvm -o %t
// RUN: FileCheck %s < %t
// RUN: FileCheck -check-prefix=CHECK-GLOBAL %s < %t
diff --git a/clang/test/Driver/amdgpu-visibility.cl b/clang/test/Driver/amdgpu-visibility.cl
index fb47c5a3de67c..f2e8ae44a56ac 100644
--- a/clang/test/Driver/amdgpu-visibility.cl
+++ b/clang/test/Driver/amdgpu-visibility.cl
@@ -6,14 +6,14 @@
// RUN: %clang -### -target amdgcn-mesa-mesa3d -x cl -c -emit-llvm -fvisibility=protected %s 2>&1 | FileCheck -check-prefix=OVERRIDE-PROTECTED %s
// RUN: %clang -### -target amdgcn-mesa-mesa3d -x cl -c -emit-llvm -fvisibility-ms-compat %s 2>&1 | FileCheck -check-prefix=OVERRIDE-MS %s
-// DEFAULT-DAG: "-fvisibility" "hidden"
+// DEFAULT-DAG: "-fvisibility=hidden"
// DEFAULT-DAG: "-fapply-global-visibility-to-externs"
// OVERRIDE-PROTECTED-NOT: "-fapply-global-visibility-to-externs"
-// OVERRIDE-PROTECTED: "-fvisibility" "protected"
+// OVERRIDE-PROTECTED: "-fvisibility=protected"
// OVERRIDE-PROTECTED-NOT: "-fapply-global-visibility-to-externs"
// OVERRIDE-MS-NOT: "-fapply-global-visibility-to-externs"
-// OVERRIDE-MS-DAG: "-fvisibility" "hidden"
-// OVERRIDE-MS-DAG: "-ftype-visibility" "default"
+// OVERRIDE-MS-DAG: "-fvisibility=hidden"
+// OVERRIDE-MS-DAG: "-ftype-visibility=default"
// OVERRIDE-MS-NOT: "-fapply-global-visibility-to-externs"
diff --git a/clang/test/Driver/clang-translation.c b/clang/test/Driver/clang-translation.c
index 7d24d4c9d51c2..c471c6a8f73d6 100644
--- a/clang/test/Driver/clang-translation.c
+++ b/clang/test/Driver/clang-translation.c
@@ -6,8 +6,7 @@
// I386: "-mframe-pointer=all"
// I386: "-funwind-tables=2"
// I386: "-Os"
-// I386: "-fvisibility"
-// I386: "hidden"
+// I386: "-fvisibility=hidden"
// I386: "-o"
// I386: clang-translation
diff --git a/clang/test/Driver/hip-rdc-device-only.hip b/clang/test/Driver/hip-rdc-device-only.hip
index 8c2cbf29dfb74..6c5b9c6de57d9 100644
--- a/clang/test/Driver/hip-rdc-device-only.hip
+++ b/clang/test/Driver/hip-rdc-device-only.hip
@@ -59,7 +59,7 @@
// EMITBC-SAME: "-emit-llvm-bc"
// EMITLL-SAME: "-emit-llvm"
// COMMON-SAME: {{.*}} "-main-file-name" "a.cu"
-// COMMON-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility" "hidden"
+// COMMON-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility=hidden"
// COMMON-SAME: "-fapply-global-visibility-to-externs"
// COMMON-SAME: "-target-cpu" "gfx803"
// COMMON-SAME: "-fgpu-rdc"
@@ -72,7 +72,7 @@
// EMITBC-SAME: "-emit-llvm-bc"
// EMITLL-SAME: "-emit-llvm"
// COMMON-SAME: {{.*}} "-main-file-name" "a.cu"
-// COMMON-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility" "hidden"
+// COMMON-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility=hidden"
// COMMON-SAME: "-fapply-global-visibility-to-externs"
// COMMON-SAME: "-target-cpu" "gfx900"
// COMMON-SAME: "-fgpu-rdc"
@@ -89,7 +89,7 @@
// EMITBC-SAME: "-emit-llvm-bc"
// EMITLL-SAME: "-emit-llvm"
// COMMON-SAME: {{.*}} "-main-file-name" "b.hip"
-// COMMON-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility" "hidden"
+// COMMON-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility=hidden"
// COMMON-SAME: "-fapply-global-visibility-to-externs"
// COMMON-SAME: "-target-cpu" "gfx803"
// COMMON-SAME: "-fgpu-rdc"
@@ -102,7 +102,7 @@
// EMITBC-SAME: "-emit-llvm-bc"
// EMITLL-SAME: "-emit-llvm"
// COMMON-SAME: {{.*}} "-main-file-name" "b.hip"
-// COMMON-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility" "hidden"
+// COMMON-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility=hidden"
// COMMON-SAME: "-fapply-global-visibility-to-externs"
// COMMON-SAME: "-target-cpu" "gfx900"
// COMMON-SAME: "-fgpu-rdc"
diff --git a/clang/test/Driver/hip-toolchain-no-rdc.hip b/clang/test/Driver/hip-toolchain-no-rdc.hip
index 8cc6899520fb7..292caeb944096 100644
--- a/clang/test/Driver/hip-toolchain-no-rdc.hip
+++ b/clang/test/Driver/hip-toolchain-no-rdc.hip
@@ -48,7 +48,7 @@
// CHECK-SAME: "-emit-obj"
// CHECK-SAME: {{.*}} "-main-file-name" "a.cu"
// CHECK-SAME: "-fcuda-is-device" "-mllvm" "-amdgpu-internalize-symbols"
-// CHECK-SAME: "-fcuda-allow-variadic-functions" "-fvisibility" "hidden"
+// CHECK-SAME: "-fcuda-allow-variadic-functions" "-fvisibility=hidden"
// CHECK-SAME: "-fapply-global-visibility-to-externs"
// CHECK-SAME: "{{.*}}lib1.bc" "{{.*}}lib2.bc"
// CHECK-SAME: "-target-cpu" "gfx803"
@@ -71,7 +71,7 @@
// CHECK-SAME: "-emit-obj"
// CHECK-SAME: {{.*}} "-main-file-name" "a.cu"
// CHECK-SAME: "-fcuda-is-device" "-mllvm" "-amdgpu-internalize-symbols"
-// CHECK-SAME: "-fcuda-allow-variadic-functions" "-fvisibility" "hidden"
+// CHECK-SAME: "-fcuda-allow-variadic-functions" "-fvisibility=hidden"
// CHECK-SAME: "-fapply-global-visibility-to-externs"
// CHECK-SAME: "{{.*}}lib1.bc" "{{.*}}lib2.bc"
// CHECK-SAME: "-target-cpu" "gfx900"
@@ -111,7 +111,7 @@
// CHECK-SAME: "-emit-obj"
// CHECK-SAME: {{.*}} "-main-file-name" "b.hip"
// CHECK-SAME: "-fcuda-is-device" "-mllvm" "-amdgpu-internalize-symbols"
-// CHECK-SAME: "-fcuda-allow-variadic-functions" "-fvisibility" "hidden"
+// CHECK-SAME: "-fcuda-allow-variadic-functions" "-fvisibility=hidden"
// CHECK-SAME: "-fapply-global-visibility-to-externs"
// CHECK-SAME: "{{.*}}lib1.bc" "{{.*}}lib2.bc"
// CHECK-SAME: "-target-cpu" "gfx803"
@@ -134,7 +134,7 @@
// CHECK-SAME: "-emit-obj"
// CHECK-SAME: {{.*}} "-main-file-name" "b.hip"
// CHECK-SAME: "-fcuda-is-device" "-mllvm" "-amdgpu-internalize-symbols"
-// CHECK-SAME: "-fcuda-allow-variadic-functions" "-fvisibility" "hidden"
+// CHECK-SAME: "-fcuda-allow-variadic-functions" "-fvisibility=hidden"
// CHECK-SAME: "-fapply-global-visibility-to-externs"
// CHECK-SAME: "{{.*}}lib1.bc" "{{.*}}lib2.bc"
// CHECK-SAME: "-target-cpu" "gfx900"
diff --git a/clang/test/Driver/hip-toolchain-rdc-separate.hip b/clang/test/Driver/hip-toolchain-rdc-separate.hip
index ce58c07d1fdaa..d35f0e3f19896 100644
--- a/clang/test/Driver/hip-toolchain-rdc-separate.hip
+++ b/clang/test/Driver/hip-toolchain-rdc-separate.hip
@@ -15,7 +15,7 @@
// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu"
// CHECK-SAME: "-emit-llvm-bc"
// CHECK-SAME: {{.*}} "-main-file-name" "a.cu"
-// CHECK-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility" "hidden"
+// CHECK-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility=hidden"
// CHECK-SAME: "-fapply-global-visibility-to-externs"
// CHECK-SAME: "{{.*}}lib1.bc" "{{.*}}lib2.bc"
// CHECK-SAME: "-target-cpu" "gfx803"
@@ -50,7 +50,7 @@
// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu"
// CHECK-SAME: "-emit-llvm-bc"
// CHECK-SAME: {{.*}} "-main-file-name" "b.hip"
-// CHECK-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility" "hidden"
+// CHECK-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility=hidden"
// CHECK-SAME: "-fapply-global-visibility-to-externs"
// CHECK-SAME: "{{.*}}lib1.bc" "{{.*}}lib2.bc"
// CHECK-SAME: "-target-cpu" "gfx803"
diff --git a/clang/test/Driver/hip-toolchain-rdc.hip b/clang/test/Driver/hip-toolchain-rdc.hip
index 09da934c594a9..89ccd1654ccee 100644
--- a/clang/test/Driver/hip-toolchain-rdc.hip
+++ b/clang/test/Driver/hip-toolchain-rdc.hip
@@ -55,7 +55,7 @@
// CHECK-SAME: "-aux-triple" [[HOST:"x86_64-[^"]+"]]
// CHECK-SAME: "-emit-llvm-bc"
// CHECK-SAME: {{.*}} "-main-file-name" "a.cu"
-// CHECK-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility" "hidden"
+// CHECK-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility=hidden"
// CHECK-SAME: "-fapply-global-visibility-to-externs"
// CHECK-SAME: "{{.*}}lib1.bc" "{{.*}}lib2.bc"
// CHECK-SAME: "-target-cpu" "gfx803"
@@ -67,7 +67,7 @@
// CHECK-SAME: "-aux-triple" [[HOST]]
// CHECK-SAME: "-emit-llvm-bc"
// CHECK-SAME: {{.*}} "-main-file-name" "b.hip"
-// CHECK-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility" "hidden"
+// CHECK-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions" "-fvisibility=hidden"
// CHECK-SAME: "-fapply-global-visibility-to-externs"
// CHECK-SAME: "{{.*}}lib1.bc" "{{.*}}lib2.bc"
// CHECK-SAME: "-target-cpu" "gfx803"
diff --git a/clang/test/Driver/hipspv-toolchain-rdc.hip b/clang/test/Driver/hipspv-toolchain-rdc.hip
index 98f7debac2ce5..2bfcec977d392 100644
--- a/clang/test/Driver/hipspv-toolchain-rdc.hip
+++ b/clang/test/Driver/hipspv-toolchain-rdc.hip
@@ -27,7 +27,7 @@
// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu"
// CHECK-SAME: "-emit-llvm-bc"
// CHECK-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions"
-// CHECK-SAME: "-fvisibility" "hidden" "-fapply-global-visibility-to-externs"
+// CHECK-SAME: "-fvisibility=hidden" "-fapply-global-visibility-to-externs"
// CHECK-SAME: "-fgpu-rdc"
// CHECK-SAME: {{.*}} "-o" [[A_BC1:".*bc"]] "-x" "hip"
// CHECK-SAME: {{.*}} [[A_SRC]]
@@ -36,7 +36,7 @@
// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu"
// CHECK-SAME: "-emit-llvm-bc"
// CHECK-SAME: "-fcuda-is-device" "-fcuda-allow-variadic-functions"
-// CHECK-SAME: "-fvisibility" "hidden" "-fapply-global-visibility-to-externs"
+// CHECK-SAME: "-fvisibility=hidden" "-fapply-global-visibility-to-externs"
// CHECK-SAME: "-fgpu-rdc"
// CHECK-SAME: {{.*}} "-o" [[B_BC1:".*bc"]] "-x" "hip"
// CHECK-SAME: {{.*}} [[B_SRC]]
diff --git a/clang/test/Driver/visibility.cpp b/clang/test/Driver/visibility.cpp
index 5b137c8a17dcd..a5d07f3d46d4f 100644
--- a/clang/test/Driver/visibility.cpp
+++ b/clang/test/Driver/visibility.cpp
@@ -1,34 +1,34 @@
// RUN: %clang -### -S -fvisibility=hidden -fvisibility=default %s 2> %t.log
// RUN: FileCheck -check-prefix=CHECK-1 %s < %t.log
// CHECK-1-NOT: "-ftype-visibility"
-// CHECK-1: "-fvisibility" "default"
+// CHECK-1: "-fvisibility=default"
// CHECK-1-NOT: "-ftype-visibility"
// RUN: %clang -### -S -fvisibility=default -fvisibility=hidden %s 2> %t.log
// RUN: FileCheck -check-prefix=CHECK-2 %s < %t.log
// CHECK-2-NOT: "-ftype-visibility"
-// CHECK-2: "-fvisibility" "hidden"
+// CHECK-2: "-fvisibility=hidden"
// CHECK-2-NOT: "-ftype-visibility"
// RUN: %clang -### -S -fvisibility-ms-compat -fvisibility=hidden %s 2> %t.log
// RUN: FileCheck -check-prefix=CHECK-3 %s < %t.log
// CHECK-3-NOT: "-ftype-visibility"
-// CHECK-3: "-fvisibility" "hidden"
+// CHECK-3: "-fvisibility=hidden"
// CHECK-3-NOT: "-ftype-visibility"
// RUN: %clang -### -S -fvisibility-ms-compat -fvisibility=default %s 2> %t.log
// RUN: FileCheck -check-prefix=CHECK-4 %s < %t.log
// CHECK-4-NOT: "-ftype-visibility"
-// CHECK-4: "-fvisibility" "default"
+// CHECK-4: "-fvisibility=default"
// CHECK-4-NOT: "-ftype-visibility"
// RUN: %clang -### -S -fvisibility=hidden -fvisibility-ms-compat %s 2> %t.log
// RUN: FileCheck -check-prefix=CHECK-5 %s < %t.log
-// CHECK-5: "-fvisibility" "hidden"
-// CHECK-5: "-ftype-visibility" "default"
+// CHECK-5: "-fvisibility=hidden"
+// CHECK-5: "-ftype-visibility=default"
// RUN: %clang -### -S -fvisibility=default -fvisibility-ms-compat %s 2> %t.log
// RUN: FileCheck -check-prefix=CHECK-6 %s < %t.log
-// CHECK-6: "-fvisibility" "hidden"
-// CHECK-6: "-ftype-visibility" "default"
+// CHECK-6: "-fvisibility=hidden"
+// CHECK-6: "-ftype-visibility=default"
diff --git a/clang/test/Driver/wasm-toolchain.c b/clang/test/Driver/wasm-toolchain.c
index 7e06044a1de47..f391b2802308d 100644
--- a/clang/test/Driver/wasm-toolchain.c
+++ b/clang/test/Driver/wasm-toolchain.c
@@ -3,7 +3,7 @@
// RUN: %clang -### %s --target=wasm32-unknown-unknown 2>&1 \
// RUN: | FileCheck -check-prefix=CC1 %s
-// CC1: "-cc1" "-triple" "wasm32-unknown-unknown" {{.*}} "-fvisibility" "hidden" {{.*}}
+// CC1: "-cc1" "-triple" "wasm32-unknown-unknown" {{.*}} "-fvisibility=hidden" {{.*}}
// Ditto, but ensure that a user -fvisibility=default disables the default
// -fvisibility=hidden.
diff --git a/clang/test/Driver/wasm-toolchain.cpp b/clang/test/Driver/wasm-toolchain.cpp
index 86a223a2ff092..4af011097021f 100644
--- a/clang/test/Driver/wasm-toolchain.cpp
+++ b/clang/test/Driver/wasm-toolchain.cpp
@@ -3,7 +3,7 @@
// RUN: %clangxx -### %s --target=wasm32-unknown-unknown 2>&1 \
// RUN: | FileCheck -check-prefix=CC1 %s
-// CC1: "-cc1" "-triple" "wasm32-unknown-unknown" {{.*}} "-fvisibility" "hidden" {{.*}}
+// CC1: "-cc1" "-triple" "wasm32-unknown-unknown" {{.*}} "-fvisibility=hidden" {{.*}}
// Ditto, but ensure that a user -fvisibility=default disables the default
// -fvisibility=hidden.
More information about the cfe-commits
mailing list