[clang][lex] NFCI: Use DirectoryEntryRef in Preprocessor::MainFileDir
authorJan Svoboda <jan_svoboda@apple.com>
Thu, 25 May 2023 21:47:57 +0000 (14:47 -0700)
committerJan Svoboda <jan_svoboda@apple.com>
Tue, 30 May 2023 20:54:06 +0000 (13:54 -0700)
commite19f352beee72d8fc30d9a5366eadd2372719fa3
treef23f08bbeaa2b1a0ce4f9a1902654e43db3e47cb
parentb1e5b28b8c4d8af294906ee27a62b28079d3f337
[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
clang/include/clang/Lex/Preprocessor.h
clang/lib/Frontend/FrontendAction.cpp
clang/lib/Lex/PPDirectives.cpp