[clang] Avoid need for SLocEntryLoaded BitVector (PR #67960)
Vassil Vassilev via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 3 07:38:12 PDT 2023
================
@@ -474,9 +474,10 @@ static_assert(sizeof(FileInfo) <= sizeof(ExpansionInfo),
/// SourceManager keeps an array of these objects, and they are uniquely
/// identified by the FileID datatype.
class SLocEntry {
- static constexpr int OffsetBits = 8 * sizeof(SourceLocation::UIntTy) - 1;
+ static constexpr int OffsetBits = 8 * sizeof(SourceLocation::UIntTy) - 2;
SourceLocation::UIntTy Offset : OffsetBits;
SourceLocation::UIntTy IsExpansion : 1;
+ SourceLocation::UIntTy Loaded : 1;
----------------
vgvassilev wrote:
```suggestion
SourceLocation::UIntTy IsLoaded : 1;
```
https://github.com/llvm/llvm-project/pull/67960
More information about the cfe-commits
mailing list