r306497 - Remove a redundant call to ArgList::hasFlag. NFC.
Vedant Kumar via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 27 18:56:07 PDT 2017
Author: vedantk
Date: Tue Jun 27 18:56:07 2017
New Revision: 306497
URL: http://llvm.org/viewvc/llvm-project?rev=306497&view=rev
Log:
Remove a redundant call to ArgList::hasFlag. NFC.
Modified:
cfe/trunk/lib/Driver/ToolChains/Clang.cpp
Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=306497&r1=306496&r2=306497&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Tue Jun 27 18:56:07 2017
@@ -781,15 +781,14 @@ static void addPGOAndCoverageFlags(Compi
CmdArgs.push_back("-femit-coverage-data");
if (Args.hasFlag(options::OPT_fcoverage_mapping,
- options::OPT_fno_coverage_mapping, false) &&
- !ProfileGenerateArg)
- D.Diag(clang::diag::err_drv_argument_only_allowed_with)
- << "-fcoverage-mapping"
- << "-fprofile-instr-generate";
+ options::OPT_fno_coverage_mapping, false)) {
+ if (!ProfileGenerateArg)
+ D.Diag(clang::diag::err_drv_argument_only_allowed_with)
+ << "-fcoverage-mapping"
+ << "-fprofile-instr-generate";
- if (Args.hasFlag(options::OPT_fcoverage_mapping,
- options::OPT_fno_coverage_mapping, false))
CmdArgs.push_back("-fcoverage-mapping");
+ }
if (C.getArgs().hasArg(options::OPT_c) ||
C.getArgs().hasArg(options::OPT_S)) {
More information about the cfe-commits
mailing list