|
@@ -1855,6 +1855,11 @@ void ModuleMapParser::parseHeaderDecl(MMToken::TokenKind LeadingToken,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int compareModuleHeaders(const Module::Header *A,
|
|
|
|
+ const Module::Header *B) {
|
|
|
|
+ return A->NameAsWritten.compare(B->NameAsWritten);
|
|
|
|
+}
|
|
|
|
+
|
|
/// \brief Parse an umbrella directory declaration.
|
|
/// \brief Parse an umbrella directory declaration.
|
|
///
|
|
///
|
|
/// umbrella-dir-declaration:
|
|
/// umbrella-dir-declaration:
|
|
@@ -1914,10 +1919,8 @@ void ModuleMapParser::parseUmbrellaDirDecl(SourceLocation UmbrellaLoc) {
|
|
}
|
|
}
|
|
|
|
|
|
// Sort header paths so that the pcm doesn't depend on iteration order.
|
|
// Sort header paths so that the pcm doesn't depend on iteration order.
|
|
- llvm::array_pod_sort(Headers.begin(), Headers.end(),
|
|
|
|
- [](const Module::Header *A, const Module::Header *B) {
|
|
|
|
- return A->NameAsWritten.compare(B->NameAsWritten);
|
|
|
|
- });
|
|
|
|
|
|
+ llvm::array_pod_sort(Headers.begin(), Headers.end(), compareModuleHeaders);
|
|
|
|
+
|
|
for (auto &Header : Headers)
|
|
for (auto &Header : Headers)
|
|
Map.addHeader(ActiveModule, std::move(Header), ModuleMap::TextualHeader);
|
|
Map.addHeader(ActiveModule, std::move(Header), ModuleMap::TextualHeader);
|
|
return;
|
|
return;
|