From 952eddef9aff85b1e92626e89baaf7a360e2ac85 Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 22 Dec 2013 00:07:40 +0000 Subject: Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3): https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841 --- test/Driver/debug-options.c | 60 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 10 deletions(-) (limited to 'test/Driver/debug-options.c') diff --git a/test/Driver/debug-options.c b/test/Driver/debug-options.c index ca77abf..1f890b2 100644 --- a/test/Driver/debug-options.c +++ b/test/Driver/debug-options.c @@ -1,13 +1,33 @@ // Check to make sure clang is somewhat picky about -g options. // rdar://10383444 -// RUN: %clang -### -c -g %s 2>&1 | FileCheck -check-prefix=G %s -// RUN: %clang -### -c -g2 %s 2>&1 | FileCheck -check-prefix=G %s -// RUN: %clang -### -c -g3 %s 2>&1 | FileCheck -check-prefix=G %s -// RUN: %clang -### -c -ggdb %s 2>&1 | FileCheck -check-prefix=G %s -// RUN: %clang -### -c -ggdb1 %s 2>&1 | FileCheck -check-prefix=G %s -// RUN: %clang -### -c -ggdb3 %s 2>&1 | FileCheck -check-prefix=G %s -// RUN: %clang -### -c -gdwarf-2 %s 2>&1 | FileCheck -check-prefix=G %s +// RUN: %clang -### -c -g %s -target x86_64-linux-gnu 2>&1 \ + | FileCheck -check-prefix=G %s +// RUN: %clang -### -c -g2 %s -target x86_64-linux-gnu 2>&1 \ + | FileCheck -check-prefix=G %s +// RUN: %clang -### -c -g3 %s -target x86_64-linux-gnu 2>&1 \ + | FileCheck -check-prefix=G %s +// RUN: %clang -### -c -ggdb %s -target x86_64-linux-gnu 2>&1 \ + | FileCheck -check-prefix=G %s +// RUN: %clang -### -c -ggdb1 %s -target x86_64-linux-gnu 2>&1 \ + | FileCheck -check-prefix=G %s +// RUN: %clang -### -c -ggdb3 %s -target x86_64-linux-gnu 2>&1 \ + | FileCheck -check-prefix=G %s + +// RUN: %clang -### -c -g %s -target x86_64-apple-darwin 2>&1 \ + | FileCheck -check-prefix=G_DARWIN %s +// RUN: %clang -### -c -g2 %s -target x86_64-apple-darwin 2>&1 \ + | FileCheck -check-prefix=G_DARWIN %s +// RUN: %clang -### -c -g3 %s -target x86_64-apple-darwin 2>&1 \ + | FileCheck -check-prefix=G_DARWIN %s +// RUN: %clang -### -c -ggdb %s -target x86_64-apple-darwin 2>&1 \ + | FileCheck -check-prefix=G_DARWIN %s +// RUN: %clang -### -c -ggdb1 %s -target x86_64-apple-darwin 2>&1 \ + | FileCheck -check-prefix=G_DARWIN %s +// RUN: %clang -### -c -ggdb3 %s -target x86_64-apple-darwin 2>&1 \ + | FileCheck -check-prefix=G_DARWIN %s + +// RUN: %clang -### -c -gdwarf-2 %s 2>&1 | FileCheck -check-prefix=G_D2 %s // // RUN: %clang -### -c -gfoo %s 2>&1 | FileCheck -check-prefix=G_NO %s // RUN: %clang -### -c -g -g0 %s 2>&1 | FileCheck -check-prefix=G_NO %s @@ -15,18 +35,29 @@ // // RUN: %clang -### -c -gline-tables-only %s 2>&1 \ // RUN: | FileCheck -check-prefix=GLTO_ONLY %s -// RUN: %clang -### -c -gline-tables-only -g %s 2>&1 \ +// RUN: %clang -### -c -gline-tables-only -g %s -target x86_64-linux-gnu 2>&1 \ // RUN: | FileCheck -check-prefix=G_ONLY %s +// RUN: %clang -### -c -gline-tables-only -g %s -target x86_64-apple-darwin 2>&1 \ +// RUN: | FileCheck -check-prefix=G_ONLY_DARWIN %s // RUN: %clang -### -c -gline-tables-only -g0 %s 2>&1 \ // RUN: | FileCheck -check-prefix=GLTO_NO %s // // RUN: %clang -### -c -grecord-gcc-switches -gno-record-gcc-switches \ -// RUN: -gstrict-dwarf -gno-strict-dwarf %s 2>&1 \ -// RUN: | not grep "argument unused during compilation" +// RUN: -gstrict-dwarf -gno-strict-dwarf -fdebug-types-section \ +// RUN: -fno-debug-types-section %s 2>&1 \ +// RUN: | FileCheck -check-prefix=GIGNORE %s +// +// RUN: %clang -### -c -ggnu-pubnames %s 2>&1 | FileCheck -check-prefix=GOPT %s // // G: "-cc1" // G: "-g" // +// G_DARWIN: "-cc1" +// G_DARWIN: "-gdwarf-2" +// +// G_D2: "-cc1" +// G_D2: "-gdwarf-2" +// // G_NO: "-cc1" // G_NO-NOT: "-g" // @@ -40,5 +71,14 @@ // G_ONLY: "-g" // G_ONLY-NOT: "-gline-tables-only" // +// G_ONLY_DARWIN: "-cc1" +// G_ONLY_DARWIN-NOT: "-gline-tables-only" +// G_ONLY_DARWIN: "-gdwarf-2" +// G_ONLY_DARWIN-NOT: "-gline-tables-only" +// // GLTO_NO: "-cc1" // GLTO_NO-NOT: "-gline-tables-only" +// +// GIGNORE-NOT: "argument unused during compilation" +// +// GOPT: -generate-gnu-dwarf-pub-sections -- cgit v1.1