[modularize] Use range-based for loops (NFC) (#144244)
This commit is contained in:
parent
886174a835
commit
2669664605
@ -329,10 +329,8 @@ bool CoverageChecker::collectFileSystemHeaders() {
|
||||
else {
|
||||
// Otherwise we only look at the sub-trees specified by the
|
||||
// include paths.
|
||||
for (std::vector<std::string>::const_iterator I = IncludePaths.begin(),
|
||||
E = IncludePaths.end();
|
||||
I != E; ++I) {
|
||||
if (!collectFileSystemHeaders(*I))
|
||||
for (const std::string &IncludePath : IncludePaths) {
|
||||
if (!collectFileSystemHeaders(IncludePath))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -339,8 +339,8 @@ static std::string findInputFile(const CommandLineArguments &CLArgs) {
|
||||
llvm::opt::Visibility VisibilityMask(options::CC1Option);
|
||||
unsigned MissingArgIndex, MissingArgCount;
|
||||
SmallVector<const char *, 256> Argv;
|
||||
for (auto I = CLArgs.begin(), E = CLArgs.end(); I != E; ++I)
|
||||
Argv.push_back(I->c_str());
|
||||
for (const std::string &CLArg : CLArgs)
|
||||
Argv.push_back(CLArg.c_str());
|
||||
InputArgList Args = getDriverOptTable().ParseArgs(
|
||||
Argv, MissingArgIndex, MissingArgCount, VisibilityMask);
|
||||
std::vector<std::string> Inputs = Args.getAllArgValues(OPT_INPUT);
|
||||
|
@ -69,8 +69,7 @@ ModularizeUtilities *ModularizeUtilities::createModularizeUtilities(
|
||||
// Load all header lists and dependencies.
|
||||
std::error_code ModularizeUtilities::loadAllHeaderListsAndDependencies() {
|
||||
// For each input file.
|
||||
for (auto I = InputFilePaths.begin(), E = InputFilePaths.end(); I != E; ++I) {
|
||||
llvm::StringRef InputPath = *I;
|
||||
for (llvm::StringRef InputPath : InputFilePaths) {
|
||||
// If it's a module map.
|
||||
if (InputPath.ends_with(".modulemap")) {
|
||||
// Load the module map.
|
||||
|
Loading…
x
Reference in New Issue
Block a user