This is an archive of the discontinued LLVM Phabricator instance.

[clang] NFCI: Use DirectoryEntryRef in Module::Directory
ClosedPublic

Authored by jansvoboda11 on Jun 13 2022, 8:29 AM.

Details

Summary

This patch changes the type of Module::Directory from const DirectoryEntry * to (essentially) Optional<DirectoryEntryRef> in order to remove uses of the deprecated DirectoryEntry::getName().

Depends on D127651.

Diff Detail

Event Timeline

jansvoboda11 created this revision.Jun 13 2022, 8:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 13 2022, 8:29 AM
jansvoboda11 requested review of this revision.Jun 13 2022, 8:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 13 2022, 8:29 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
bnbarham accepted this revision.Jun 13 2022, 10:54 AM
bnbarham added inline comments.
clang/include/clang/Basic/Module.h
152

Too many places to update I assume?

This revision is now accepted and ready to land.Jun 13 2022, 10:54 AM
bnbarham added inline comments.Jun 13 2022, 10:59 AM
clang/lib/Lex/ModuleMap.cpp
184

Does a module always have a directory?

jansvoboda11 marked 2 inline comments as done.May 25 2023, 2:36 PM
jansvoboda11 added inline comments.
clang/include/clang/Basic/Module.h
152

Yes.

clang/lib/Lex/ModuleMap.cpp
184

No. Only a module we have read module map for. Module we only read from the PCM (and perhaps a standard C++ module) will not have a directory.

This revision was landed with ongoing or failed builds.May 30 2023, 1:54 PM
This revision was automatically updated to reflect the committed changes.
jansvoboda11 marked 2 inline comments as done.