aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-10-28 20:36:23 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-10-28 20:36:23 +0000
commitb14eed0ed44ed3af881219dab7dc6464cad5303b (patch)
treec192cbd90edfacefa016fc76a578d0b3b9b0726e
parent8c37668762d85ef83e59580bf188ded99179ecc4 (diff)
Driver/IA: Ignore -L for now, which users shouldn't be using for semantic effect.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117600 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticDriverKinds.td2
-rw-r--r--lib/Driver/Tools.cpp5
2 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticDriverKinds.td b/include/clang/Basic/DiagnosticDriverKinds.td
index 52b69bab76..24a0291ba6 100644
--- a/include/clang/Basic/DiagnosticDriverKinds.td
+++ b/include/clang/Basic/DiagnosticDriverKinds.td
@@ -77,6 +77,8 @@ def err_drv_cc_print_options_failure : Error<
def err_drv_preamble_format : Error<
"incorrect format for -preamble-bytes=N,END">;
+def warn_drv_unsupported_option_argument : Warning<
+ "ignoring unsupported argument '%1' to option '%0'">;
def warn_drv_input_file_unused : Warning<
"%0: '%1' input unused when '%2' is present">;
def warn_drv_preprocessed_input_file_unused : Warning<
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 021c7cb7d3..cdaea98587 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -784,6 +784,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
if (Value == "-force_cpusubtype_ALL") {
// Do nothing, this is the default and we don't support anything else.
+ } else if (Value == "-L") {
+ // We don't support -L yet, but it isn't important enough to error
+ // on. No one should really be using it for a semantic change.
+ D.Diag(clang::diag::warn_drv_unsupported_option_argument)
+ << A->getOption().getName() << Value;
} else {
D.Diag(clang::diag::err_drv_unsupported_option_argument)
<< A->getOption().getName() << Value;