[clang] Fix redirection behaviour for cached FileEntryRef

In 6a79e2ff1989b we changed Filemanager::getEntryRef() to return the
redirecting FileEntryRef instead of looking through the redirection.
This commit fixes the case when looking up a cached file path to also
return the redirecting FileEntryRef. This mainly affects the behaviour
of calling getNameAsRequested() on the resulting entry ref.

Differential Revision: https://reviews.llvm.org/D131273

GitOrigin-RevId: d038bb196c51dcf80cbe771f4229b4e227c6c5b6
2 files changed