================
@@ -738,7 +738,25 @@ def CIR_RecordType : CIR_Type<"Record", "record", [
     }
 
     void complete(llvm::ArrayRef<mlir::Type> members, bool packed,
-                  bool isPadded);
+                  bool isPadded, bool canPassInRegisters = false,
+                  bool hasTrivialDestructor = true,
+                  uint64_t recordAlignInBytes = 0);
+
+    /// Whether the record can be passed in registers per the C++
+    /// ABI.  Wraps RecordDecl::canPassInRegisters().  Named
+    /// records default to false; anonymous records default to true.
+    bool getCanPassInRegisters() const;
----------------
adams381 wrote:

Good catch. I went ahead and used a three-state enum (CanPassInRegs, 
CannotPassInRegs, CanNeverPassInRegs) mirroring the AST's RecordArgPassingKind. 
Today the classifier only checks the boolean, but keeping all three states is 
cheap and future-proofs us.

https://github.com/llvm/llvm-project/pull/188300
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to