[cfe-commits] r151654 - in /cfe/trunk: include/clang/Driver/Options.td test/Driver/debug-options.c
Chad Rosier
mcrosier at apple.com
Tue Feb 28 12:49:04 PST 2012
Author: mcrosier
Date: Tue Feb 28 14:49:04 2012
New Revision: 151654
URL: http://llvm.org/viewvc/llvm-project?rev=151654&view=rev
Log:
[driver] Add support for -g2 and -ggdb debug flags.
rdar://10947759
Modified:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/test/Driver/debug-options.c
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=151654&r1=151653&r2=151654&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Tue Feb 28 14:49:04 2012
@@ -545,9 +545,11 @@
def fdata_sections : Flag <"-fdata-sections">, Group<f_Group>;
def f : Joined<"-f">, Group<f_Group>;
def g0 : Flag<"-g0">, Group<g_Group>;
+def g2 : Flag<"-g2">, Group<g_Group>;
def g3 : Flag<"-g3">, Group<g_Group>;
def gdwarf2 : Flag<"-gdwarf-2">, Group<g_Group>;
def gfull : Flag<"-gfull">, Group<g_Group>;
+def ggdb : Flag<"-ggdb">, Group<g_Group>;
def gstabs : Flag<"-gstabs">, Group<g_Group>;
def gstabsplus : Flag<"-gstabs+">, Group<g_Group>;
def gstabs1 : Flag<"-gstabs1">, Group<g_Group>;
Modified: cfe/trunk/test/Driver/debug-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/debug-options.c?rev=151654&r1=151653&r2=151654&view=diff
==============================================================================
--- cfe/trunk/test/Driver/debug-options.c (original)
+++ cfe/trunk/test/Driver/debug-options.c Tue Feb 28 14:49:04 2012
@@ -2,18 +2,26 @@
// rdar://10383444
// RUN: %clang -### -c -g %s 2>&1 | FileCheck -check-prefix=G %s
+// RUN: %clang -### -c -g2 %s 2>&1 | FileCheck -check-prefix=G2 %s
// RUN: %clang -### -c -g3 %s 2>&1 | FileCheck -check-prefix=G3 %s
// RUN: %clang -### -c -ganything %s 2>&1 | FileCheck -check-prefix=GANY %s
+// RUN: %clang -### -c -ggdb %s 2>&1 | FileCheck -check-prefix=GGDB %s
// RUN: %clang -### -c -gfoo %s 2>&1 | FileCheck -check-prefix=GFOO %s
//
// G: "-cc1"
// G: "-g"
//
+// G2: "-cc1"
+// G2: "-g"
+//
// G3: "-cc1"
// G3: "-g"
//
// GANY: "-cc1"
// GANY-NOT: "-g"
//
+// GGDB: "-cc1"
+// GGDB: "-g"
+//
// GFOO: "-cc1"
// GFOO-NOT: "-g"
More information about the cfe-commits
mailing list