From: Manman Ren Date: Wed, 3 Jul 2013 20:45:07 +0000 (+0000) Subject: Update testing cases to check dwarf-2 for Darwin. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e7830480e20e810d1cb2352a8ccc5f63ecf79e27;p=clang Update testing cases to check dwarf-2 for Darwin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185577 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Driver/clang-g-opts.c b/test/Driver/clang-g-opts.c index ee4eed7e89..9ca1fd38e4 100644 --- a/test/Driver/clang-g-opts.c +++ b/test/Driver/clang-g-opts.c @@ -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" diff --git a/test/Driver/debug-options.c b/test/Driver/debug-options.c index 490b74656c..449d8a9bda 100644 --- a/test/Driver/debug-options.c +++ b/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" //