Lines Matching +full:path +full:- +full:map

1 //===- HeaderSearch.cpp - Resolve Header File Locations -------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
38 #include "llvm/Support/Path.h"
52 #define DEBUG_TYPE "file-search"
57 "Number of #includes skipped due to the multi-include optimization.");
69 External->GetIdentifier(LazyControllingMacro.getID()); in getControllingMacro()
74 if (ControllingMacro && ControllingMacro->isOutOfDate()) { in getControllingMacro()
77 External->updateOutOfDateIdentifier(*ControllingMacro); in getControllingMacro()
102 << " #includes skipped due to the multi-include optimization.\n"; in PrintStats()
133 std::vector<bool> UserEntryUsage(HSOpts->UserEntries.size()); in computeUserEntryUsage()
140 UserEntryUsage[UserEntryIdxIt->second] = true; in computeUserEntryUsage()
156 VFSUsage.push_back(RFS->hasBeenUsed()); in collectVFSUsageAndClear()
157 RFS->clearHasBeenUsed(); in collectVFSUsageAndClear()
162 "-ivfsoverlay options passed to Clang!"); in collectVFSUsageAndClear()
168 /// CreateHeaderMap - This method returns a HeaderMap for the specified
172 // If it ever grows, use of a linear search should be re-evaluated. in CreateHeaderMap()
203 return getCachedModuleFileName(Module->Name, ModuleMap->getNameAsRequested()); in getCachedModuleFileName()
208 // First check the module name to pcm file map. in getPrebuiltModuleFileName()
209 auto i(HSOpts->PrebuiltModuleFiles.find(ModuleName)); in getPrebuiltModuleFileName()
210 if (i != HSOpts->PrebuiltModuleFiles.end()) in getPrebuiltModuleFileName()
211 return i->second; in getPrebuiltModuleFileName()
213 if (FileMapOnly || HSOpts->PrebuiltModulePaths.empty()) in getPrebuiltModuleFileName()
218 for (const std::string &Dir : HSOpts->PrebuiltModulePaths) { in getPrebuiltModuleFileName()
223 // systems, here clang and gcc choose '-' by default since it is not a in getPrebuiltModuleFileName()
225 llvm::sys::path::append(Result, ModuleName.split(':').first + "-" + in getPrebuiltModuleFileName()
229 llvm::sys::path::append(Result, ModuleName + ".pcm"); in getPrebuiltModuleFileName()
240 StringRef ModuleName = Module->Name; in getPrebuiltImplicitModuleFileName()
241 StringRef ModuleMapPath = ModuleMap->getName(); in getPrebuiltImplicitModuleFileName()
242 StringRef ModuleCacheHash = HSOpts->DisableModuleHash ? "" : getModuleHash(); in getPrebuiltImplicitModuleFileName()
243 for (const std::string &Dir : HSOpts->PrebuiltModulePaths) { in getPrebuiltImplicitModuleFileName()
246 llvm::sys::path::append(CachePath, ModuleCacheHash); in getPrebuiltImplicitModuleFileName()
264 // If we don't have a module cache path or aren't supposed to use one, we in getCachedModuleFileNameImpl()
272 if (HSOpts->DisableModuleHash) { in getCachedModuleFileNameImpl()
273 llvm::sys::path::append(Result, ModuleName + ".pcm"); in getCachedModuleFileNameImpl()
275 // Construct the name <ModuleName>-<hash of ModuleMapPath>.pcm which should in getCachedModuleFileNameImpl()
280 // To avoid false-negatives, we form as canonical a path as we can, and map in getCachedModuleFileNameImpl()
281 // to lower-case in case we're on a case-insensitive file system. in getCachedModuleFileNameImpl()
290 llvm::sys::path::append(Result, ModuleName + "-" + HashStr + ".pcm"); in getCachedModuleFileNameImpl()
298 // Look in the module map to determine if there is a module by this name. in lookupModule()
300 if (Module || !AllowSearch || !HSOpts->ImplicitModuleMaps) in lookupModule()
307 // The facility for "private modules" -- adjacent, optional module maps named in lookupModule()
308 // module.private.modulemap that are supposed to define private submodules -- in lookupModule()
330 // maps, searching for a module map that describes this module. in lookupModule()
333 // Search for or infer a module map for a framework. Here we use in lookupModule()
337 FrameworkDirName += Dir.getFrameworkDirRef()->getName(); in lookupModule()
338 llvm::sys::path::append(FrameworkDirName, SearchName + ".framework"); in lookupModule()
358 // Search for a module map file in this directory. in lookupModule()
361 // We just loaded a module map file; check whether the module is in lookupModule()
368 // Search for a module map in a subdirectory with the same name as the in lookupModule()
371 NestedModuleMapDirName = Dir.getDirRef()->getName(); in lookupModule()
372 llvm::sys::path::append(NestedModuleMapDirName, ModuleName); in lookupModule()
375 // If we just loaded a module map file, look for the module again. in lookupModule()
420 Dir.getHeaderMap()->forEachKey(Callback); in indexInitialHeaderMaps()
424 //===----------------------------------------------------------------------===//
426 //===----------------------------------------------------------------------===//
428 /// getName - Return the directory or filename corresponding to this lookup
432 return getDirRef()->getName(); in getName()
434 return getFrameworkDirRef()->getName(); in getName()
436 return getHeaderMap()->getFileName(); in getName()
444 // If we have a module map that might map this header, load it and in getFileAndSuggestModule()
462 *File, Dir ? Dir : File->getFileEntry().getDir(), RequestingModule, in getFileAndSuggestModule()
469 /// LookupFile - Lookup the specified file in this search path, returning it
485 TmpDir = getDirRef()->getName(); in LookupFile()
486 llvm::sys::path::append(TmpDir, Filename); in LookupFile()
488 StringRef SearchPathRef(getDirRef()->getName()); in LookupFile()
489 SearchPath->clear(); in LookupFile()
490 SearchPath->append(SearchPathRef.begin(), SearchPathRef.end()); in LookupFile()
493 RelativePath->clear(); in LookupFile()
494 RelativePath->append(Filename.begin(), Filename.end()); in LookupFile()
509 SmallString<1024> Path; in LookupFile() local
510 StringRef Dest = HM->lookupFilename(Filename, Path); in LookupFile()
517 [&](FileEntryRef File) -> OptionalFileEntryRef { in LookupFile()
520 SearchPath->clear(); in LookupFile()
521 SearchPath->append(SearchPathRef.begin(), SearchPathRef.end()); in LookupFile()
524 RelativePath->clear(); in LookupFile()
525 RelativePath->append(Filename.begin(), Filename.end()); in LookupFile()
536 // ("Foo.h" -> "Foo/Foo.h"), in which case continue header lookup using the in LookupFile()
538 if (llvm::sys::path::is_relative(Dest)) { in LookupFile()
541 Dest = HM->lookupFilename(Filename, Path); in LookupFile()
556 /// Given a framework directory, find the top-most framework directory.
560 /// \param SubmodulePath Will be populated with the submodule path from the
561 /// returned top-level module to the originally named framework.
565 assert(llvm::sys::path::extension(DirName) == ".framework" && in getTopFrameworkDir()
568 // Note: as an egregious but useful hack we use the real path here, because in getTopFrameworkDir()
569 // frameworks moving between top-level frameworks to embedded frameworks tend in getTopFrameworkDir()
575 // where 'Bar' used to be embedded in 'Foo', is now a top-level framework in getTopFrameworkDir()
580 // Similar issues occur when a top-level framework has moved into an in getTopFrameworkDir()
588 DirName = llvm::sys::path::parent_path(DirName); in getTopFrameworkDir()
599 if (llvm::sys::path::extension(DirName) == ".framework") { in getTopFrameworkDir()
600 SubmodulePath.push_back(std::string(llvm::sys::path::stem(DirName))); in getTopFrameworkDir()
611 (RequestingModule && RequestingModule->NoUndeclaredIncludes); in needModuleLookup()
614 /// DoFrameworkLookup - Do a lookup of the specified file in the current
637 // Otherwise, construct the path to this framework dir. in DoFrameworkLookup()
641 FrameworkName += getFrameworkDirRef()->getName(); in DoFrameworkLookup()
666 // user-specified as a system framework. in DoFrameworkLookup()
681 RelativePath->clear(); in DoFrameworkLookup()
682 RelativePath->append(Filename.begin()+SlashPos+1, Filename.end()); in DoFrameworkLookup()
691 SearchPath->clear(); in DoFrameworkLookup()
693 SearchPath->append(FrameworkName.begin(), FrameworkName.end()-1); in DoFrameworkLookup()
706 SearchPath->insert(SearchPath->begin()+OrigSize, Private, in DoFrameworkLookup()
716 StringRef FrameworkPath = File->getDir().getName(); in DoFrameworkLookup()
726 if (llvm::sys::path::extension(FrameworkPath) == ".framework") { in DoFrameworkLookup()
732 FrameworkPath = llvm::sys::path::parent_path(FrameworkPath); in DoFrameworkLookup()
767 << HSOpts->UserEntries[UserEntryIdxIt->second].Path; in noteLookupUsage()
774 //===----------------------------------------------------------------------===//
776 //===----------------------------------------------------------------------===//
786 Diags.Report(IncludeLoc, diag::ext_pp_include_search_ms) << MSFE->getName(); in checkMSVCHeaderSearch()
800 static bool isFrameworkStylePath(StringRef Path, bool &IsPrivateHeader, in isFrameworkStylePath() argument
804 path::const_iterator I = path::begin(Path); in isFrameworkStylePath()
805 path::const_iterator E = path::end(Path); in isFrameworkStylePath()
813 // ...<other variations with 'Versions' like in the above path> in isFrameworkStylePath()
823 } else if (I->ends_with(".framework")) { in isFrameworkStylePath()
824 StringRef Name = I->drop_back(10); // Drop .framework in isFrameworkStylePath()
833 IncludeSpelling.append(I->begin(), I->end()); in isFrameworkStylePath()
880 /// LookupFile - Given a "foo" or \<foo> reference, look up the indicated file,
883 /// non-empty, indicates where the \#including file(s) are, in case a relative
906 if (llvm::sys::path::is_absolute(Filename)) { in LookupFile()
914 SearchPath->clear(); in LookupFile()
916 RelativePath->clear(); in LookupFile()
917 RelativePath->append(Filename.begin(), Filename.end()); in LookupFile()
943 llvm::sys::path::append(TmpDir, Filename); in LookupFile()
957 return HFI->DirInfo != SrcMgr::C_User; in LookupFile()
975 unsigned DirInfo = FromHFI->DirInfo; in LookupFile()
976 bool IndexHeaderMapHeader = FromHFI->IndexHeaderMapHeader; in LookupFile()
977 StringRef Framework = FromHFI->Framework; in LookupFile()
986 SearchPath->clear(); in LookupFile()
987 SearchPath->append(SearchPathRef.begin(), SearchPathRef.end()); in LookupFile()
990 RelativePath->clear(); in LookupFile()
991 RelativePath->append(Filename.begin(), Filename.end()); in LookupFile()
1000 // Otherwise, we found the path via MSVC header search rules. If in LookupFile()
1001 // -Wmsvc-include is enabled, we have to keep searching to see if we in LookupFile()
1002 // would've found this header in -I or -isystem directories. in LookupFile()
1063 // In index => Start with a specific header map in LookupFile()
1064 It = search_dir_nth(Iter->second); in LookupFile()
1078 OptionalFileEntryRef File = It->LookupFile( in LookupFile()
1083 assert(IsInHeaderMap && "MappedName should come from a header map"); in LookupFile()
1088 // A filename is mapped when a header map remapped it to a relative path in LookupFile()
1089 // used in subsequent header search or to an absolute path pointing to an in LookupFile()
1106 HFI.DirInfo = CurDir->getDirCharacteristic(); in LookupFile()
1109 // user-specified to be treated as a system framework, promote the in LookupFile()
1116 for (unsigned j = SystemHeaderPrefixes.size(); j; --j) { in LookupFile()
1117 if (Filename.starts_with(SystemHeaderPrefixes[j - 1].first)) { in LookupFile()
1118 HFI.DirInfo = SystemHeaderPrefixes[j-1].second ? SrcMgr::C_System in LookupFile()
1124 // Set the `Framework` info if this file is in a header map with framework in LookupFile()
1125 // style include spelling or found in a framework dir. The header map case in LookupFile()
1127 if (CurDir->isHeaderMap() && isAngled) { in LookupFile()
1132 if (CurDir->isIndexHeaderMap()) in LookupFile()
1134 } else if (CurDir->isFramework()) { in LookupFile()
1141 if (checkMSVCHeaderSearch(Diags, MSFE, &File->getFileEntry(), IncludeLoc)) { in LookupFile()
1167 if (IncludingHFI->IndexHeaderMapHeader) { in LookupFile()
1169 ScratchFilename += IncludingHFI->Framework; in LookupFile()
1179 File ? &File->getFileEntry() : nullptr, in LookupFile()
1204 /// LookupSubframeworkHeader - Look up a subframework for the specified
1266 RelativePath->clear(); in LookupSubframeworkHeader()
1267 RelativePath->append(Filename.begin()+SlashPos+1, Filename.end()); in LookupSubframeworkHeader()
1274 SearchPath->clear(); in LookupSubframeworkHeader()
1276 SearchPath->append(HeadersFilename.begin(), HeadersFilename.end()-1); in LookupSubframeworkHeader()
1286 SearchPath->clear(); in LookupSubframeworkHeader()
1288 SearchPath->append(HeadersFilename.begin(), HeadersFilename.end()-1); in LookupSubframeworkHeader()
1303 unsigned DirInfo = ContextHFI->DirInfo; in LookupSubframeworkHeader()
1315 //===----------------------------------------------------------------------===//
1317 //===----------------------------------------------------------------------===//
1322 return !HFI->isModuleHeader || HFI->isTextualModuleHeader; in moduleMembershipNeedsMerge()
1323 if (!HFI->isModuleHeader && (Role & ModuleMap::TextualHeader)) in moduleMembershipNeedsMerge()
1324 return !HFI->isTextualModuleHeader; in moduleMembershipNeedsMerge()
1372 if (ExternalSource && !HFI->Resolved) { in getFileInfo()
1373 auto ExternalHFI = ExternalSource->GetHeaderFileInfo(FE); in getFileInfo()
1375 HFI->Resolved = true; in getFileInfo()
1381 HFI->IsValid = true; in getFileInfo()
1384 HFI->External = false; in getFileInfo()
1396 if (!HFI->Resolved) { in getExistingFileInfo()
1397 auto ExternalHFI = ExternalSource->GetHeaderFileInfo(FE); in getExistingFileInfo()
1399 HFI->Resolved = true; in getExistingFileInfo()
1410 return (HFI && HFI->IsValid) ? HFI : nullptr; in getExistingFileInfo()
1422 return (HFI && HFI->IsValid && !HFI->External) ? HFI : nullptr; in getExistingLocalFileInfo()
1430 return HFI->isPragmaOnce || HFI->LazyControllingMacro.isValid(); in isFileMultipleIncludeGuarded()
1437 // Don't mark the file info as non-external if there's nothing to change. in MarkFileModuleHeader()
1458 // "include-once" file. in ShouldEnterIncludeFile()
1460 // Include-once is controlled by these preprocessor directives. in ShouldEnterIncludeFile()
1463 // This directive is in the include file, and marks it as an include-once in ShouldEnterIncludeFile()
1473 auto MaybeReenterImportedFile = [&]() -> bool { in ShouldEnterIncludeFile()
1486 // function will run. If c.h is include-once, it will not be entered from in ShouldEnterIncludeFile()
1497 // This brings up a subtlety of #import - it's not a very good indicator of in ShouldEnterIncludeFile()
1498 // include-once. Developers are often unaware of the difference between in ShouldEnterIncludeFile()
1500 // In order to support #include on include-once headers that lack macro in ShouldEnterIncludeFile()
1501 // guards and `#pragma once` (which is the vast majority of Objective-C in ShouldEnterIncludeFile()
1503 // isImport in the HeaderFileInfo and treated as include-once. This allows in ShouldEnterIncludeFile()
1504 // #include to work in Objective-C. in ShouldEnterIncludeFile()
1511 // include-once file, but something included it with #import anyway (as is in ShouldEnterIncludeFile()
1512 // typical in Objective-C code), this include will be skipped and c.h will in ShouldEnterIncludeFile()
1513 // not be visible. Consider it not include-once if it is a `textual` header in ShouldEnterIncludeFile()
1519 // It's safer to re-enter a file whose module is being built because its in ShouldEnterIncludeFile()
1524 // to mark stdarg.h and stddef.h as textual. Attempt to re-enter these in ShouldEnterIncludeFile()
1530 // re-entered from their own module. This might cause redeclaration in ShouldEnterIncludeFile()
1534 // really is an include-once file. in ShouldEnterIncludeFile()
1540 // re-entered if the controlling macro is visibly defined. e.g. another in ShouldEnterIncludeFile()
1544 // It might be tempting to re-enter the include-once file if it's not in ShouldEnterIncludeFile()
1546 // redeclaration errors against the known-but-not-visible declarations. The in ShouldEnterIncludeFile()
1554 // it as an include-once file from here out. in ShouldEnterIncludeFile()
1561 // include-once file. in ShouldEnterIncludeFile()
1598 return &DL - &*SearchDirs.begin(); in searchDirIdx()
1602 return FrameworkNames.insert(Framework).first->first(); in getUniqueFrameworkName()
1609 return It->second; in getIncludeNameForHeader()
1615 if (!HSOpts->ImplicitModuleMaps) in hasModuleMap()
1623 DirName = llvm::sys::path::parent_path(DirName); in hasModuleMap()
1632 // Try to load the module map file in this directory. in hasModuleMap()
1634 llvm::sys::path::extension(Dir->getName()) == in hasModuleMap()
1639 // map file. in hasModuleMap()
1654 // having module maps if we eventually do find a module map. in hasModuleMap()
1697 // file that's in a non-dependency module. in suggestModule()
1698 if (RequestingModule && Module && RequestingModule->NoUndeclaredIncludes) { in suggestModule()
1700 if (!RequestingModule->directlyUses(Module.getModule())) { in suggestModule()
1711 // TODO: Add this module (or just its module map file) into something like in suggestModule()
1712 // `RequestingModule->AffectingClangModules`. in suggestModule()
1741 // Find the top-level framework based on this framework. in findUsableModuleForFrameworkHeader()
1745 assert(TopFrameworkDir && "Could not find the top-most framework dir"); in findUsableModuleForFrameworkHeader()
1747 // Determine the name of the top-level framework. in findUsableModuleForFrameworkHeader()
1748 StringRef ModuleName = llvm::sys::path::stem(TopFrameworkDir->getName()); in findUsableModuleForFrameworkHeader()
1766 StringRef Filename = llvm::sys::path::filename(File.getName()); in getPrivateModuleMap()
1768 if (Filename == "module.map") in getPrivateModuleMap()
1769 llvm::sys::path::append(PrivateFilename, "module_private.map"); in getPrivateModuleMap()
1771 llvm::sys::path::append(PrivateFilename, "module.private.modulemap"); in getPrivateModuleMap()
1776 if (Filename == "module.map") in getPrivateModuleMap()
1794 // We're building a preprocessed module map. Find or invent the directory in loadModuleMapFile()
1797 llvm::sys::path::parent_path(OriginalModuleMapFile)); in loadModuleMapFile()
1807 StringRef DirName(Dir->getName()); in loadModuleMapFile()
1808 if (llvm::sys::path::filename(DirName) == "Modules") { in loadModuleMapFile()
1809 DirName = llvm::sys::path::parent_path(DirName); in loadModuleMapFile()
1819 assert(Dir && "module map home directory must exist"); in loadModuleMapFile()
1828 llvm_unreachable("Unknown load module map result"); in loadModuleMapFile()
1835 // Check whether we've already loaded this module map, and mark it as being in loadModuleMapFileImpl()
1839 return AddResult.first->second ? LMM_AlreadyLoaded : LMM_InvalidModuleMap; in loadModuleMapFileImpl()
1846 // Try to load a corresponding private module map. in loadModuleMapFileImpl()
1855 // This directory has a module map. in loadModuleMapFileImpl()
1861 if (!HSOpts->ImplicitModuleMaps) in lookupModuleMapFile()
1864 // module.map at the framework root is also accepted. in lookupModuleMapFile()
1867 llvm::sys::path::append(ModuleMapFileName, "Modules"); in lookupModuleMapFile()
1868 llvm::sys::path::append(ModuleMapFileName, "module.modulemap"); in lookupModuleMapFile()
1872 // Continue to allow module.map, but warn it's deprecated. in lookupModuleMapFile()
1874 llvm::sys::path::append(ModuleMapFileName, "module.map"); in lookupModuleMapFile()
1881 // For frameworks, allow to have a private module map with a preferred in lookupModuleMapFile()
1882 // spelling when a public module map is absent. in lookupModuleMapFile()
1885 llvm::sys::path::append(ModuleMapFileName, "Modules", in lookupModuleMapFile()
1895 // Try to load a module map file. in loadFrameworkModule()
1898 // Try to infer a module map from the framework directory. in loadFrameworkModule()
1899 if (HSOpts->ImplicitModuleMaps) in loadFrameworkModule()
1928 return KnownDir->second ? LMM_AlreadyLoaded : LMM_InvalidModuleMap; in loadModuleMapFile()
1949 if (HSOpts->ImplicitModuleMaps) { in collectAllModules()
1956 llvm::sys::path::native(DL.getFrameworkDirRef()->getName(), DirNative); in collectAllModules()
1963 if (llvm::sys::path::extension(Dir->path()) != ".framework") in collectAllModules()
1966 auto FrameworkDir = FileMgr.getOptionalDirectoryRef(Dir->path()); in collectAllModules()
1971 loadFrameworkModule(llvm::sys::path::stem(Dir->path()), *FrameworkDir, in collectAllModules()
1981 // Try to load a module map file for the search directory. in collectAllModules()
1984 // Try to load module map files for immediate subdirectories of this in collectAllModules()
1996 if (!HSOpts->ImplicitModuleMaps) in loadTopLevelSystemModules()
2005 // Try to load a module map file for the search directory. in loadTopLevelSystemModules()
2012 assert(HSOpts->ImplicitModuleMaps && in loadSubdirectoryModuleMaps()
2019 SmallString<128> Dir = SearchDir.getDirRef()->getName(); in loadSubdirectoryModuleMaps()
2022 llvm::sys::path::native(Dir, DirNative); in loadSubdirectoryModuleMaps()
2026 if (Dir->type() == llvm::sys::fs::file_type::regular_file) in loadSubdirectoryModuleMaps()
2028 bool IsFramework = llvm::sys::path::extension(Dir->path()) == ".framework"; in loadSubdirectoryModuleMaps()
2030 loadModuleMapFile(Dir->path(), SearchDir.isSystemHeaderDirectory(), in loadSubdirectoryModuleMaps()
2049 if (!WorkingDir.empty() && !path::is_absolute(FilePath)) in suggestPathToFileForDiagnostics()
2051 // remove_dots switches to backslashes on windows as a side-effect! in suggestPathToFileForDiagnostics()
2054 path::remove_dots(FilePath, /*remove_dot_dot=*/true); in suggestPathToFileForDiagnostics()
2055 path::native(FilePath, path::Style::posix); in suggestPathToFileForDiagnostics()
2059 // Checks whether `Dir` is a strict path prefix of `File`. If so and that's in suggestPathToFileForDiagnostics()
2062 auto CheckDir = [&](llvm::SmallString<32> Dir) -> bool { in suggestPathToFileForDiagnostics()
2063 if (!WorkingDir.empty() && !path::is_absolute(Dir)) in suggestPathToFileForDiagnostics()
2065 path::remove_dots(Dir, /*remove_dot_dot=*/true); in suggestPathToFileForDiagnostics()
2066 for (auto NI = path::begin(File), NE = path::end(File), in suggestPathToFileForDiagnostics()
2067 DI = path::begin(Dir), DE = path::end(Dir); in suggestPathToFileForDiagnostics()
2070 // Dir is a prefix of File, up to choice of path separators. in suggestPathToFileForDiagnostics()
2071 unsigned PrefixLength = NI - path::begin(File); in suggestPathToFileForDiagnostics()
2079 // Consider all path separators equal. in suggestPathToFileForDiagnostics()
2080 if (NI->size() == 1 && DI->size() == 1 && in suggestPathToFileForDiagnostics()
2081 path::is_separator(NI->front()) && path::is_separator(DI->front())) in suggestPathToFileForDiagnostics()
2084 // Special case Apple .sdk folders since the search path is typically a in suggestPathToFileForDiagnostics()
2087 if (NI->ends_with(".sdk") && DI->ends_with(".sdk")) { in suggestPathToFileForDiagnostics()
2088 StringRef NBasename = path::stem(*NI); in suggestPathToFileForDiagnostics()
2089 StringRef DBasename = path::stem(*DI); in suggestPathToFileForDiagnostics()
2103 StringRef Dir = DL.getDirRef()->getName(); in suggestPathToFileForDiagnostics()
2110 StringRef Dir = DL.getFrameworkDirRef()->getName(); in suggestPathToFileForDiagnostics()
2120 // Try to shorten include path using TUs directory, if we couldn't find any in suggestPathToFileForDiagnostics()
2122 if (!BestPrefixLength && CheckDir(path::parent_path(MainFile))) { in suggestPathToFileForDiagnostics()
2136 DL.getHeaderMap()->reverseLookupFilename(Filename); in suggestPathToFileForDiagnostics()
2144 // If the best prefix is a framework path, we need to compute the proper in suggestPathToFileForDiagnostics()
2153 return path::convert_to_slash(Filename); in suggestPathToFileForDiagnostics()