summaryrefslogtreecommitdiffstats
path: root/test/Driver/debug-options.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
committerdim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
commit952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch)
treedf8df0b0067b381eab470a3b8f28d14a552a6340 /test/Driver/debug-options.c
parentea266cad53e3d49771fa38103913d3ec7a166694 (diff)
downloadFreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip
FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'test/Driver/debug-options.c')
-rw-r--r--test/Driver/debug-options.c60
1 files changed, 50 insertions, 10 deletions
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
OpenPOWER on IntegriCloud