Skip to content

Commit 07ec9a3

Browse files
committed
[clang][NFC] Partially annotate CGFunctionInfo.h with preferred_type
`CallingConvention` and `EffectiveCallingConvention` bit-fields that hold `llvm::CallingConv` are impossible to annotate at the moment, as `llvm::CallingConv` is actually a namespace with an unnamed enum inside.
1 parent c0ed1b2 commit 07ec9a3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

clang/include/clang/CodeGen/CGFunctionInfo.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,35 +564,45 @@ class CGFunctionInfo final
564564
unsigned EffectiveCallingConvention : 8;
565565

566566
/// The clang::CallingConv that this was originally created with.
567+
LLVM_PREFERRED_TYPE(CallingConv)
567568
unsigned ASTCallingConvention : 6;
568569

569570
/// Whether this is an instance method.
571+
LLVM_PREFERRED_TYPE(bool)
570572
unsigned InstanceMethod : 1;
571573

572574
/// Whether this is a chain call.
575+
LLVM_PREFERRED_TYPE(bool)
573576
unsigned ChainCall : 1;
574577

575578
/// Whether this function is called by forwarding arguments.
576579
/// This doesn't support inalloca or varargs.
580+
LLVM_PREFERRED_TYPE(bool)
577581
unsigned DelegateCall : 1;
578582

579583
/// Whether this function is a CMSE nonsecure call
584+
LLVM_PREFERRED_TYPE(bool)
580585
unsigned CmseNSCall : 1;
581586

582587
/// Whether this function is noreturn.
588+
LLVM_PREFERRED_TYPE(bool)
583589
unsigned NoReturn : 1;
584590

585591
/// Whether this function is returns-retained.
592+
LLVM_PREFERRED_TYPE(bool)
586593
unsigned ReturnsRetained : 1;
587594

588595
/// Whether this function saved caller registers.
596+
LLVM_PREFERRED_TYPE(bool)
589597
unsigned NoCallerSavedRegs : 1;
590598

591599
/// How many arguments to pass inreg.
600+
LLVM_PREFERRED_TYPE(bool)
592601
unsigned HasRegParm : 1;
593602
unsigned RegParm : 3;
594603

595604
/// Whether this function has nocf_check attribute.
605+
LLVM_PREFERRED_TYPE(bool)
596606
unsigned NoCfCheck : 1;
597607

598608
/// Log 2 of the maximum vector width.
@@ -604,6 +614,7 @@ class CGFunctionInfo final
604614
/// passing non-trivial types with inalloca. Not part of the profile.
605615
llvm::StructType *ArgStruct;
606616
unsigned ArgStructAlign : 31;
617+
LLVM_PREFERRED_TYPE(bool)
607618
unsigned HasExtParameterInfos : 1;
608619

609620
unsigned NumArgs;

0 commit comments

Comments
 (0)