[PATCH] D44032: Remove -i command line option, add -imultilib
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 2 13:47:27 PST 2018
erichkeane updated this revision to Diff 136845.
erichkeane added a comment.
Talked to Aaron and came up with a way of covering with a testcase.
https://reviews.llvm.org/D44032
Files:
include/clang/Driver/Options.td
test/Driver/unknown-arg.c
Index: include/clang/Driver/Options.td
===================================================================
--- include/clang/Driver/Options.td
+++ include/clang/Driver/Options.td
@@ -1764,7 +1764,7 @@
Flags<[CC1Option]>;
def ivfsoverlay : JoinedOrSeparate<["-"], "ivfsoverlay">, Group<clang_i_Group>, Flags<[CC1Option]>,
HelpText<"Overlay the virtual filesystem described by file over the real file system">;
-def i : Joined<["-"], "i">, Group<i_Group>;
+def imultilib : Separate<["-"], "imultilib">, Group<gfortran_Group>;
def keep__private__externs : Flag<["-"], "keep_private_externs">;
def l : JoinedOrSeparate<["-"], "l">, Flags<[LinkerInput, RenderJoined]>,
Group<Link_Group>;
Index: test/Driver/unknown-arg.c
===================================================================
--- test/Driver/unknown-arg.c
+++ test/Driver/unknown-arg.c
@@ -1,5 +1,7 @@
-// RUN: not %clang %s -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -### 2>&1 | \
+// RUN: not %clang %s -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -ifoo -imultilib dir -### 2>&1 | \
// RUN: FileCheck %s
+// RUN: %clang %s -imultilib dir -### 2>&1 | \
+// RUN: FileCheck %s --check-prefix=MULTILIB
// RUN: not %clang %s -stdlibs=foo -hell -version -### 2>&1 | \
// RUN: FileCheck %s --check-prefix=DID-YOU-MEAN
// RUN: %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -### -c -- %s 2>&1 | \
@@ -24,6 +26,8 @@
// CHECK: error: unknown argument: '-munknown-to-clang-option'
// CHECK: error: unknown argument: '-print-stats'
// CHECK: error: unknown argument: '-funknown-to-clang-option'
+// CHECK: error: unknown argument: '-ifoo'
+// MULTILIB: warning: argument unused during compilation: '-imultilib dir'
// DID-YOU-MEAN: error: unknown argument '-stdlibs=foo', did you mean '-stdlib=foo'?
// DID-YOU-MEAN: error: unknown argument '-hell', did you mean '-help'?
// DID-YOU-MEAN: error: unknown argument '-version', did you mean '--version'?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44032.136845.patch
Type: text/x-patch
Size: 2078 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180302/d0561df8/attachment.bin>
More information about the cfe-commits
mailing list