Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2022-06-07 11:13:30 -07:00
4 changed files with 41 additions and 0 deletions

View File

@@ -602,6 +602,7 @@ static swift::file_types::ID computeFileTypeForPath(const StringRef Path) {
// then iterate over all preceeding possible extension variants.
while (llvm::sys::path::has_extension(PathStem)) {
auto NextExtension = llvm::sys::path::extension(PathStem);
PathStem = llvm::sys::path::stem(PathStem);
Extension = NextExtension.str() + Extension;
FileType = file_types::lookupTypeForExtension(Extension);
if (FileType != swift::file_types::ID::TY_INVALID)