[all-commits] [llvm/llvm-project] 1b042d: FileManager: Add FileEntryRef::getDir, returning D...
Duncan P. N. Exon Smith via All-commits
all-commits at lists.llvm.org
Mon Nov 30 14:51:07 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 1b042de5b29af4869a77ecbc632029fba0313dec
https://github.com/llvm/llvm-project/commit/1b042de5b29af4869a77ecbc632029fba0313dec
Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
Date: 2020-11-30 (Mon, 30 Nov 2020)
Changed paths:
M clang/include/clang/Basic/DirectoryEntry.h
M clang/include/clang/Basic/FileEntry.h
M clang/lib/Basic/FileManager.cpp
M clang/unittests/Basic/FileEntryTest.cpp
Log Message:
-----------
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
Commit: 94f537c6b2bb55c8e058a9989d02ab0d68a0c61a
https://github.com/llvm/llvm-project/commit/94f537c6b2bb55c8e058a9989d02ab0d68a0c61a
Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
Date: 2020-11-30 (Mon, 30 Nov 2020)
Changed paths:
M clang/unittests/Basic/FileEntryTest.cpp
Log Message:
-----------
Remove dead code added in ac49500cd0484e1b2dcf37fa4c0dade6f113c2c9, NFC
This was a copy/paste bug; `M0` is never referenced later.
Compare: https://github.com/llvm/llvm-project/compare/1b9f214efca7...94f537c6b2bb
More information about the All-commits
mailing list