diff options
Diffstat (limited to 'clang/lib/Lex/HeaderSearch.cpp')
-rw-r--r-- | clang/lib/Lex/HeaderSearch.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp index af763059ea9..16a53bf634a 100644 --- a/clang/lib/Lex/HeaderSearch.cpp +++ b/clang/lib/Lex/HeaderSearch.cpp @@ -869,7 +869,10 @@ const FileEntry *HeaderSearch::LookupFile( *IsMapped = true; } if (IsFrameworkFound) - *IsFrameworkFound |= IsFrameworkFoundInDir; + // Because we keep a filename remapped for subsequent search directory + // lookups, ignore IsFrameworkFoundInDir after the first remapping and not + // just for remapping in a current search directory. + *IsFrameworkFound |= (IsFrameworkFoundInDir && !CacheLookup.MappedName); if (!FE) continue; CurDir = &SearchDirs[i]; |