[clang] 35737be - [clang][NFC] Annotate `CodeGenFunction.h` with `preferred_type`

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 11 01:11:59 PST 2024


Author: Vlad Serebrennikov
Date: 2024-02-11T12:11:49+03:00
New Revision: 35737beaef1452b6ecdb0e6d7a359d48c8e9236a

URL: https://github.com/llvm/llvm-project/commit/35737beaef1452b6ecdb0e6d7a359d48c8e9236a
DIFF: https://github.com/llvm/llvm-project/commit/35737beaef1452b6ecdb0e6d7a359d48c8e9236a.diff

LOG: [clang][NFC] Annotate `CodeGenFunction.h` with `preferred_type`

This helps debuggers to display values in bit-fields in a more helpful way.

Added: 
    

Modified: 
    clang/lib/CodeGen/CodeGenFunction.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 143ad64e8816b1..fc9b32878068c1 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -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)
@@ -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; }


        


More information about the cfe-commits mailing list