This patch implements llvm::PointerLikeTraits<FileEntryRef> and llvm::PointerLikeTraits<DirectoryEntryRef>, allowing some simplifications around umbrella header/directory code.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Note that this enables usage of {File,Directory}EntryRef in other containers using PointerLikeTraits such as SmallPtrSet.
| clang/include/clang/Basic/DirectoryEntry.h | ||
|---|---|---|
| 211 | I suggest not hard-coding it if you can get away with it; maybe PointerLikeTypeTraits<clang::DirectoryEntryRef::MapEntry *>::NumLowBitsAvailable? I think 3 could be wrong on a 32-bit platform for example. | |
| clang/include/clang/Basic/DirectoryEntry.h | ||
|---|---|---|
| 211 | Good idea, updated. | |
I suggest not hard-coding it if you can get away with it; maybe PointerLikeTypeTraits<clang::DirectoryEntryRef::MapEntry *>::NumLowBitsAvailable? I think 3 could be wrong on a 32-bit platform for example.