[clang] d1f1bff - [AIX][XCOFF] Fixed the test case which failed at aix OS because enable -mignore-xcoff-visibility by default.
via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 15 14:34:08 PDT 2021
Author: diggerlin
Date: 2021-03-15T17:33:02-04:00
New Revision: d1f1bff81bd9909fcfdb4d97af9e3ab5d827b529
URL: https://github.com/llvm/llvm-project/commit/d1f1bff81bd9909fcfdb4d97af9e3ab5d827b529
DIFF: https://github.com/llvm/llvm-project/commit/d1f1bff81bd9909fcfdb4d97af9e3ab5d827b529.diff
LOG: [AIX][XCOFF] Fixed the test case which failed at aix OS because enable -mignore-xcoff-visibility by default.
Summary:
because we enable -mignore-xcoff-visibility by default when there is no -fvisibility option in the clang in AIX OS
it will cause some test case fail at aix os. in order to let the -mignore-xcoff-visibility to be disable, we need to add the -fvisibility=default for those test case.
Reviewers: hubert.reinterpretcast daltenty
Differential Revision: https://reviews.llvm.org/D98660
Added:
Modified:
clang/test/CodeGen/hidden-visibility.c
clang/test/CodeGen/private-extern.c
clang/test/Index/symbol-visibility.c
Removed:
################################################################################
diff --git a/clang/test/CodeGen/hidden-visibility.c b/clang/test/CodeGen/hidden-visibility.c
index 65e6616ef19f..585939081cb5 100644
--- a/clang/test/CodeGen/hidden-visibility.c
+++ b/clang/test/CodeGen/hidden-visibility.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -fvisibility default -emit-llvm -o - | FileCheck %s
// CHECK: hidden global
int X __attribute__ ((__visibility__ ("hidden"))) = 123;
diff --git a/clang/test/CodeGen/private-extern.c b/clang/test/CodeGen/private-extern.c
index 26b3fcede5ab..dae623762ca3 100644
--- a/clang/test/CodeGen/private-extern.c
+++ b/clang/test/CodeGen/private-extern.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fvisibility default -emit-llvm -o - %s | FileCheck %s
// CHECK-DAG: @g0 = external hidden constant i32
// CHECK-DAG: @g1 = hidden constant i32 1
diff --git a/clang/test/Index/symbol-visibility.c b/clang/test/Index/symbol-visibility.c
index 014e80f81878..4a8179dddff3 100644
--- a/clang/test/Index/symbol-visibility.c
+++ b/clang/test/Index/symbol-visibility.c
@@ -1,4 +1,4 @@
-// RUN: c-index-test -test-print-visibility %s | FileCheck %s
+// RUN: c-index-test -test-print-visibility -fvisibility=default %s | FileCheck %s
__attribute__ ((visibility ("default"))) void foo1();
__attribute__ ((visibility ("hidden"))) void foo2();
More information about the cfe-commits
mailing list