summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/debug-options.c
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2013-07-03 20:45:07 +0000
committerManman Ren <mren@apple.com>2013-07-03 20:45:07 +0000
commit825e8e41ad7232ee3fea11da1f13e605d37f6d2d (patch)
tree29e439be881c529813735fcfc6bf6b7c65950a5f /clang/test/Driver/debug-options.c
parentcb3ded043cd221606d5e50a368ee9b5c1fab9497 (diff)
downloadbcm5719-llvm-825e8e41ad7232ee3fea11da1f13e605d37f6d2d.tar.gz
bcm5719-llvm-825e8e41ad7232ee3fea11da1f13e605d37f6d2d.zip
Update testing cases to check dwarf-2 for Darwin.
llvm-svn: 185577
Diffstat (limited to 'clang/test/Driver/debug-options.c')
-rw-r--r--clang/test/Driver/debug-options.c49
1 files changed, 39 insertions, 10 deletions
diff --git a/clang/test/Driver/debug-options.c b/clang/test/Driver/debug-options.c
index 490b74656c6..449d8a9bdae 100644
--- a/clang/test/Driver/debug-options.c
+++ b/clang/test/Driver/debug-options.c
@@ -1,12 +1,32 @@
// 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 -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
@@ -15,8 +35,10 @@
//
// 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
//
@@ -26,8 +48,10 @@
// RUN: | FileCheck -check-prefix=GIGNORE %s
//
// G: "-cc1"
-// Can be -gdwarf.
-// G: "-g
+// G: "-g"
+//
+// G_DARWIN: "-cc1"
+// G_DARWIN: "-gdwarf-2"
//
// G_D2: "-cc1"
// G_D2: "-gdwarf-2"
@@ -42,9 +66,14 @@
//
// G_ONLY: "-cc1"
// G_ONLY-NOT: "-gline-tables-only"
-// G_ONLY: "-g
+// 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"
//
OpenPOWER on IntegriCloud