[clang][lex] NFCI: Use DirectoryEntryRef in Preprocessor::MainFileDir

This patch changes the type of `Preprocessor::MainFileDir` from `const DirectoryEntry *` to `Optional<DirectoryEntryRef>` in order to remove some calls to the deprecated `DirectoryEntry::getName()`.

Depends on D127658.

Reviewed By: bnbarham

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

GitOrigin-RevId: e19f352beee72d8fc30d9a5366eadd2372719fa3
3 files changed