diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-04-28 00:18:30 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-04-28 00:18:30 +0000 |
commit | 389c053587b11ab3c2e1ee7d63865c98b82a42f7 (patch) | |
tree | 2d8371ba0fcb6d9b18990f9cb0f7c1b1dd321cb3 /test/Driver/fsanitize.c | |
parent | 435fb2e082de73cf836ef5272504a4872115ff07 (diff) |
Driver: only produce CFI -fvisibility= error when compiling.
The -fvisibility= flag only affects compile jobs, so there's no need to
error out because of it if we aren't compiling (e.g. if we are only linking).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267824 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/fsanitize.c')
-rw-r--r-- | test/Driver/fsanitize.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/Driver/fsanitize.c b/test/Driver/fsanitize.c index df3d71cbb0..40cd49525e 100644 --- a/test/Driver/fsanitize.c +++ b/test/Driver/fsanitize.c @@ -309,8 +309,10 @@ // RUN: %clang -target x86_64-linux-gnu -flto -fsanitize=cfi-derived-cast -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOVIS // CHECK-CFI-NOVIS: '-fsanitize=cfi-derived-cast' only allowed with '-fvisibility=' -// RUN: %clang -target x86_64-pc-win32 -flto -fsanitize=cfi-derived-cast -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOVIS-WIN -// CHECK-CFI-NOVIS-WIN-NOT: only allowed with +// RUN: %clang -target x86_64-pc-win32 -flto -fsanitize=cfi-derived-cast -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOVIS-NOERROR +// RUN: echo > %t.o +// RUN: %clang -target x86_64-linux-gnu -flto -fsanitize=cfi-derived-cast %t.o -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOVIS-NOERROR +// CHECK-CFI-NOVIS-NOERROR-NOT: only allowed with // RUN: %clang -target mips-unknown-linux -fsanitize=cfi-icall %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-ICALL-MIPS // CHECK-CFI-ICALL-MIPS: unsupported option '-fsanitize=cfi-icall' for target 'mips-unknown-linux' |