Improve support for -g options accepted by Clang:
1. Accept flags -g[0-3], -ggdb[0-3], -gdwarf-[2-4] and collapse them to simple -g (except -g0/-ggdb0).
2. Produce driver error on unsupported formats (-gcoff, -gstabs, -gvms) and options (-gtoggle).
3. Recognize and ignore flags -g[no-]strict-dwarf, -g[no-]record-gcc-switches.

llvm-svn: 158906
diff --git a/clang/test/Driver/debug-unsupported.c b/clang/test/Driver/debug-unsupported.c
new file mode 100644
index 0000000..2c3de0b
--- /dev/null
+++ b/clang/test/Driver/debug-unsupported.c
@@ -0,0 +1,13 @@
+// RUN: %clang -c -gstabs %s 2>&1 | FileCheck %s
+// RUN: %clang -c -gstabs+ %s 2>&1 | FileCheck %s
+// RUN: %clang -c -gcoff %s 2>&1 | FileCheck %s
+// RUN: %clang -c -gxcoff %s 2>&1 | FileCheck %s
+// RUN: %clang -c -gxcoff+ %s 2>&1 | FileCheck %s
+// RUN: %clang -c -gvms %s 2>&1 | FileCheck %s
+// RUN: %clang -c -gstabs1 %s 2>&1 | FileCheck %s
+// RUN: %clang -c -gcoff2 %s 2>&1 | FileCheck %s
+// RUN: %clang -c -gxcoff3 %s 2>&1 | FileCheck %s
+// RUN: %clang -c -gvms0 %s 2>&1 | FileCheck %s
+// RUN: %clang -c -gtoggle %s 2>&1 | FileCheck %s
+//
+// CHECK: clang: error: unsupported option