Driver: Claim unused input arguments when emitting "input file unused"

diagnostic (to suppress more generic unused warning).

llvm-svn: 67294
This commit is contained in:
Daniel Dunbar 2009-03-19 07:57:08 +00:00
parent 2da027244d
commit adc5c7c2fd
1 changed files with 2 additions and 0 deletions

View File

@ -530,6 +530,8 @@ void Driver::BuildActions(const ArgList &Args, ActionList &Actions) const {
// part of this compilation, warn the user about it.
phases::ID InitialPhase = types::getCompilationPhase(InputType, 0);
if (InitialPhase > FinalPhase) {
// Claim here to avoid the more general unused warning.
InputArg->claim();
Diag(clang::diag::warn_drv_input_file_unused)
<< InputArg->getValue(Args)
<< getPhaseName(InitialPhase)