Skip to content

Commit

Permalink
[clang][NFC] Annotate Interp/Descriptor.h with preferred_type
Browse files Browse the repository at this point in the history
This helps debuggers to display values in bit-fields in a more helpful way.
  • Loading branch information
Endilll committed Feb 11, 2024
1 parent 3bf89e5 commit 1366e4f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions clang/lib/AST/Interp/Descriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,22 @@ struct InlineDescriptor {

/// Flag indicating if the storage is constant or not.
/// Relevant for primitive fields.
LLVM_PREFERRED_TYPE(bool)
unsigned IsConst : 1;
/// For primitive fields, it indicates if the field was initialized.
/// Primitive fields in static storage are always initialized.
/// Arrays are always initialized, even though their elements might not be.
/// Base classes are initialized after the constructor is invoked.
LLVM_PREFERRED_TYPE(bool)
unsigned IsInitialized : 1;
/// Flag indicating if the field is an embedded base class.
LLVM_PREFERRED_TYPE(bool)
unsigned IsBase : 1;
/// Flag indicating if the field is the active member of a union.
LLVM_PREFERRED_TYPE(bool)
unsigned IsActive : 1;
/// Flag indicating if the field is mutable (if in a record).
LLVM_PREFERRED_TYPE(bool)
unsigned IsFieldMutable : 1;

const Descriptor *Desc;
Expand Down

0 comments on commit 1366e4f

Please sign in to comment.