r185577 - Update testing cases to check dwarf-2 for Darwin.
Manman Ren
mren at apple.com
Wed Jul 3 13:45:07 PDT 2013
Author: mren
Date: Wed Jul 3 15:45:07 2013
New Revision: 185577
URL: http://llvm.org/viewvc/llvm-project?rev=185577&view=rev
Log:
Update testing cases to check dwarf-2 for Darwin.
Modified:
cfe/trunk/test/Driver/clang-g-opts.c
cfe/trunk/test/Driver/debug-options.c
Modified: cfe/trunk/test/Driver/clang-g-opts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-g-opts.c?rev=185577&r1=185576&r2=185577&view=diff
==============================================================================
--- cfe/trunk/test/Driver/clang-g-opts.c (original)
+++ cfe/trunk/test/Driver/clang-g-opts.c Wed Jul 3 15:45:07 2013
@@ -1,10 +1,16 @@
// RUN: %clang -### -S %s 2>&1 | FileCheck --check-prefix=CHECK-WITHOUT-G %s
-// RUN: %clang -### -S %s -g 2>&1 | FileCheck --check-prefix=CHECK-WITH-G %s
+// RUN: %clang -### -S %s -g -target x86_64-linux-gnu 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-WITH-G %s
+// RUN: %clang -### -S %s -g -target x86_64-apple-darwin 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DARWIN %s
// RUN: %clang -### -S %s -g0 2>&1 | FileCheck --check-prefix=CHECK-WITHOUT-G %s
// RUN: %clang -### -S %s -g -g0 2>&1 | FileCheck --check-prefix=CHECK-WITHOUT-G %s
-// RUN: %clang -### -S %s -g0 -g 2>&1 | FileCheck --check-prefix=CHECK-WITH-G %s
+// RUN: %clang -### -S %s -g0 -g -target x86_64-linux-gnu 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-WITH-G %s
+// RUN: %clang -### -S %s -g0 -g -target x86_64-apple-darwin 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DARWIN %s
// CHECK-WITHOUT-G-NOT: "-g"
-// Can be -gdwarf.
-// CHECK-WITH-G: "-g
+// CHECK-WITH-G: "-g"
+// CHECK-WITH-G-DARWIN: "-gdwarf-2"
Modified: cfe/trunk/test/Driver/debug-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/debug-options.c?rev=185577&r1=185576&r2=185577&view=diff
==============================================================================
--- cfe/trunk/test/Driver/debug-options.c (original)
+++ cfe/trunk/test/Driver/debug-options.c Wed Jul 3 15:45:07 2013
@@ -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"
//
More information about the cfe-commits
mailing list