From 1f27b5db16ee5bc7496ba3b06f38deb609402c61 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 1 Apr 2014 00:27:28 +0000 Subject: [PATCH] Fix up compression related test cases Fallout from r205261, ensure it doesn't matter how we disable compressed debug info, even if zlib is missing and that we warn when we don't have zlib and don't warn when we do, all while silently suppressing these tests on the systems they weren't intended for... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205271 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Driver/compress.c | 10 +++++++--- test/Driver/integrated-as.s | 6 ------ test/Driver/nozlibcompress.c | 6 ++++++ 3 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 test/Driver/nozlibcompress.c diff --git a/test/Driver/compress.c b/test/Driver/compress.c index dcc443e273..6cdc6b7224 100644 --- a/test/Driver/compress.c +++ b/test/Driver/compress.c @@ -1,4 +1,8 @@ -// RUN: %clang -c %s -Wa,--compress-debug-sections 2>&1 | FileCheck %s -// REQUIRES: nozlib +// RUN: %clang -### -c -integrated-as -Wa,-compress-debug-sections %s 2>&1 | FileCheck --check-prefix=COMPRESS_DEBUG %s +// RUN: %clang -### -c -integrated-as -Wa,--compress-debug-sections %s 2>&1 | FileCheck --check-prefix=COMPRESS_DEBUG %s +// REQUIRES: zlib -// CHECK: warning: cannot compress debug sections (zlib not installed) +// COMPRESS_DEBUG: "-compress-debug-sections" + +// RUN: %clang -### -c -integrated-as -Wa,--compress-debug-sections -Wa,--nocompress-debug-sections %s 2>&1 | FileCheck --check-prefix=NOCOMPRESS_DEBUG %s +// NOCOMPRESS_DEBUG-NOT: "-compress-debug-sections" diff --git a/test/Driver/integrated-as.s b/test/Driver/integrated-as.s index 1beae824b0..ee2c8cf852 100644 --- a/test/Driver/integrated-as.s +++ b/test/Driver/integrated-as.s @@ -29,9 +29,3 @@ // XA_INCLUDE2: cc1as // XA_INCLUDE2: "-Ifoo_dir" -// RUN: %clang -### -c -integrated-as -Wa,-compress-debug-sections %s 2>&1 | FileCheck --check-prefix=COMPRESS_DEBUG %s -// RUN: %clang -### -c -integrated-as -Wa,--compress-debug-sections %s 2>&1 | FileCheck --check-prefix=COMPRESS_DEBUG %s -// COMPRESS_DEBUG: "-compress-debug-sections" - -// RUN: %clang -### -c -integrated-as -Wa,-compress-debug-sections -Wa,-nocompress-debug-sections %s 2>&1 | FileCheck --check-prefix=NOCOMPRESS_DEBUG %s -// NOCOMPRESS_DEBUG-NOT: "-compress-debug-sections" diff --git a/test/Driver/nozlibcompress.c b/test/Driver/nozlibcompress.c new file mode 100644 index 0000000000..4eac066165 --- /dev/null +++ b/test/Driver/nozlibcompress.c @@ -0,0 +1,6 @@ +// RUN: %clang -c %s -Wa,--compress-debug-sections 2>&1 | FileCheck %s +// RUN: %clang -c %s -Wa,--compress-debug-sections -Wa,--nocompress-debug-sections 2>&1 | FileCheck --check-prefix=NOWARN %s +// REQUIRES: nozlib + +// CHECK: warning: cannot compress debug sections (zlib not installed) +// NOWARN-NOT: warning: cannot compress debug sections (zlib not installed) -- 2.40.0