Driver/IA: Ignore -L for now, which users shouldn't be using for semantic effect.

llvm-svn: 117600
This commit is contained in:
Daniel Dunbar 2010-10-28 20:36:23 +00:00
parent c9f90c2a32
commit a78e589b08
2 changed files with 7 additions and 0 deletions

View File

@ -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<

View File

@ -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;