From 7ed4f663287b087bc566d29d9febdfdeb8dd2776 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Tue, 26 Jun 2012 16:57:41 +0000 Subject: [PATCH] [driver] Make -serialize-diagnostics (one dash) and alias for --serialize-diagnostics. rdar://11734800 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159208 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/Options.td | 1 + test/Driver/apple-kext-i386.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index b6d352a717..16a4366ce8 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -1123,6 +1123,7 @@ def _write_dependencies : Flag<"--write-dependencies">, Alias; def _write_user_dependencies : Flag<"--write-user-dependencies">, Alias; def _ : Joined<"--">, Flags<[Unsupported]>; def mieee_rnd_near : Flag<"-mieee-rnd-near">, Group; +def serialize_diags : Separate<"-serialize-diagnostics">, Alias<_serialize_diags>; // Special internal option to handle -Xlinker --no-demangle. def Z_Xlinker__no_demangle : Flag<"-Z-Xlinker-no-demangle">, diff --git a/test/Driver/apple-kext-i386.cpp b/test/Driver/apple-kext-i386.cpp index c11a1361a1..eb9f9578e9 100644 --- a/test/Driver/apple-kext-i386.cpp +++ b/test/Driver/apple-kext-i386.cpp @@ -41,6 +41,11 @@ // CHECK-UNSUPPORTED2: cc1plus" // CHECK-UNSUPPORTED2-NOT: "-Wconstant-logical-operand" +// Check that -serialize-diagnostics does not cause an "argument unused" error. +// RUN: %clang -target i386-apple-darwin10 \ +// RUN: -Wall -fapple-kext -### -serialize-diagnostics %t.dia -c %s 2>&1 | \ +// RUN: FileCheck --check-prefix=CHECK-UNUSED %s + // Check that --serialize-diagnostics does not cause an "argument unused" error. // RUN: %clang -target i386-apple-darwin10 \ // RUN: -Wall -fapple-kext -### --serialize-diagnostics %t.dia -c %s 2>&1 | \ -- 2.40.0