Skip to content

Commit

Permalink
[clang][NFC] Annotate CodeGenFunction.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 fd80304 commit 35737be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clang/lib/CodeGen/CodeGenFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ template <> struct DominatingValue<RValue> {

llvm::Value *Value;
llvm::Type *ElementType;
LLVM_PREFERRED_TYPE(Kind)
unsigned K : 3;
unsigned Align : 29;
saved_type(llvm::Value *v, llvm::Type *e, Kind k, unsigned a = 0)
Expand Down Expand Up @@ -650,9 +651,11 @@ class CodeGenFunction : public CodeGenTypeCache {
struct LifetimeExtendedCleanupHeader {
/// The size of the following cleanup object.
unsigned Size;
/// The kind of cleanup to push: a value from the CleanupKind enumeration.
/// The kind of cleanup to push.
LLVM_PREFERRED_TYPE(CleanupKind)
unsigned Kind : 31;
/// Whether this is a conditional cleanup.
LLVM_PREFERRED_TYPE(bool)
unsigned IsConditional : 1;

size_t getSize() const { return Size; }
Expand Down

0 comments on commit 35737be

Please sign in to comment.