diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2020-10-29 18:00:31 -0400 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2020-11-30 14:50:46 -0800 |
commit | 1b042de5b29af4869a77ecbc632029fba0313dec (patch) | |
tree | 1945db936a13b98307a63e797f302c8fce87c9fb /clang/lib/Lex/ModuleMap.cpp | |
parent | 1b9f214efca7d5855f4e3dd1969c4cbe77078f97 (diff) | |
download | llvm-1b042de5b29af4869a77ecbc632029fba0313dec.zip llvm-1b042de5b29af4869a77ecbc632029fba0313dec.tar.gz llvm-1b042de5b29af4869a77ecbc632029fba0313dec.tar.bz2 |
FileManager: Add FileEntryRef::getDir, returning DirectoryEntryRef
Add `FileEntryRef::getDir`, which returns a `DirectoryEntryRef`. This
includes a few changes:
- Customize `OptionalStorage` so that `Optional<DirectoryEntryRef>` is
pointer-sized (like the change made to `Optional<FileEntryRef>`).
Factored out a common class, `FileMgr::MapEntryOptionalStorage`, to
reduce the code duplication.
- Store an `Optional<DirectoryEntryRef>` in `FileEntryRef::MapValue`.
This is set if and only if `MapValue` has a real `FileEntry`.
- Change `FileManager::getFileRef` and `getVirtualFileRef` to use
`getDirectoryRef` and store it in the `StringMap` for `FileEntryRef`.
Differential Revision: https://reviews.llvm.org/D90484
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions