From 3b5d9980e674023101c52c6e8339e832b7cf43c8 Mon Sep 17 00:00:00 2001 From: Puyan Lotfi Date: Sat, 12 Oct 2019 02:46:57 +0000 Subject: [PATCH] [clang][IFS] Updating tests to pass on -fvisibility=hidden builds (NFCi). Special thanks to JamesNagurne who got to the bottom of this; landing this on his behalf. Differential Revision: https://reviews.llvm.org/D68897 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374632 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/InterfaceStubs/externstatic.c | 12 ++++++------ test/InterfaceStubs/merge-conflict-test.c | 4 ++-- test/InterfaceStubs/object-float.c | 4 ++-- test/InterfaceStubs/object.c | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/test/InterfaceStubs/externstatic.c b/test/InterfaceStubs/externstatic.c index 37d5b7db19..9a1f0ae491 100644 --- a/test/InterfaceStubs/externstatic.c +++ b/test/InterfaceStubs/externstatic.c @@ -1,19 +1,19 @@ -// RUN: %clang -c -DSTORAGE="extern" -o - -emit-interface-stubs -std=c99 -xc %s | \ +// RUN: %clang -fvisibility=default -c -DSTORAGE="extern" -o - -emit-interface-stubs -std=c99 -xc %s | \ // RUN: FileCheck -check-prefix=CHECK-EXTERN %s -// RUN: %clang -DSTORAGE="extern" -O0 -o - -c -std=c99 \ +// RUN: %clang -fvisibility=default -DSTORAGE="extern" -O0 -o - -c -std=c99 \ // RUN: -xc %s | llvm-nm - 2>&1 | FileCheck -check-prefix=CHECK-EXTERN %s -// RUN: %clang -c -DSTORAGE="extern" -o - -emit-interface-stubs -std=c99 -xc %s | \ +// RUN: %clang -fvisibility=default -c -DSTORAGE="extern" -o - -emit-interface-stubs -std=c99 -xc %s | \ // RUN: FileCheck -check-prefix=CHECK-EXTERN2 %s -// RUN: %clang -DSTORAGE="extern" -O0 -o - -c -std=c99 -xc %s | llvm-nm - 2>&1 | \ +// RUN: %clang -fvisibility=default -DSTORAGE="extern" -O0 -o - -c -std=c99 -xc %s | llvm-nm - 2>&1 | \ // RUN: FileCheck -check-prefix=CHECK-EXTERN2 %s -// RUN: %clang -c -DSTORAGE="static" -o - -emit-interface-stubs -std=c99 -xc %s | \ +// RUN: %clang -fvisibility=default -c -DSTORAGE="static" -o - -emit-interface-stubs -std=c99 -xc %s | \ // RUN: FileCheck -check-prefix=CHECK-STATIC %s -// RUN: %clang -DSTORAGE="static" -O0 -o - -c -std=c99 -xc %s | llvm-nm - 2>&1 | \ +// RUN: %clang -fvisibility=default -DSTORAGE="static" -O0 -o - -c -std=c99 -xc %s | llvm-nm - 2>&1 | \ // RUN: FileCheck -check-prefix=CHECK-STATIC %s // CHECK-EXTERN-NOT: foo diff --git a/test/InterfaceStubs/merge-conflict-test.c b/test/InterfaceStubs/merge-conflict-test.c index 2d006148ba..81d20bdc28 100644 --- a/test/InterfaceStubs/merge-conflict-test.c +++ b/test/InterfaceStubs/merge-conflict-test.c @@ -1,3 +1,3 @@ -// RUN: not %clang -o libfoo.so -emit-interface-stubs %s %S/driver-test.c 2>&1 | FileCheck %s +// RUN: not %clang -fvisibility=default -o libfoo.so -emit-interface-stubs %s %S/driver-test.c 2>&1 | FileCheck %s // CHECK: error: Interface Stub: Type Mismatch -int foo; \ No newline at end of file +int foo; diff --git a/test/InterfaceStubs/object-float.c b/test/InterfaceStubs/object-float.c index 6dd056bb85..be51e86ca3 100644 --- a/test/InterfaceStubs/object-float.c +++ b/test/InterfaceStubs/object-float.c @@ -1,3 +1,3 @@ -// RUN: not %clang -o - -emit-interface-stubs %s %S/object.c 2>&1 | FileCheck %s +// RUN: not %clang -fvisibility=default -o - -emit-interface-stubs %s %S/object.c 2>&1 | FileCheck %s // CHECK: error: Interface Stub: Size Mismatch -double data = 42.0; \ No newline at end of file +double data = 42.0; diff --git a/test/InterfaceStubs/object.c b/test/InterfaceStubs/object.c index b07bea930e..774b79ddec 100644 --- a/test/InterfaceStubs/object.c +++ b/test/InterfaceStubs/object.c @@ -1,6 +1,6 @@ -// RUN: %clang -c -o - -emit-interface-stubs %s | FileCheck -check-prefix=CHECK-TAPI %s -// RUN: %clang -c -o - -emit-interface-stubs %s | FileCheck -check-prefix=CHECK-SYMBOLS %s -// RUN: %clang -c -o - %s | llvm-nm - 2>&1 | FileCheck -check-prefix=CHECK-SYMBOLS %s +// RUN: %clang -fvisibility=default -c -o - -emit-interface-stubs %s | FileCheck -check-prefix=CHECK-TAPI %s +// RUN: %clang -fvisibility=default -c -o - -emit-interface-stubs %s | FileCheck -check-prefix=CHECK-SYMBOLS %s +// RUN: %clang -fvisibility=default -c -o - %s | llvm-nm - 2>&1 | FileCheck -check-prefix=CHECK-SYMBOLS %s // CHECK-TAPI: data: { Type: Object, Size: 4 } // CHECK-SYMBOLS: data -- 2.40.0