[clang] [CIR] Upstream initial support for union type (PR #137501)
Iris Shi via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 29 23:12:36 PDT 2025
================
@@ -306,3 +320,71 @@ CIRGenTypes::computeRecordLayout(const RecordDecl *rd, cir::RecordType *ty) {
// TODO: implement verification
return rl;
}
+
+void CIRRecordLowering::lowerUnion() {
+ CharUnits layoutSize = astRecordLayout.getSize();
+ mlir::Type storageType = nullptr;
+ bool seenNamedMember = false;
+
+ // Iterate through the fields setting bitFieldInfo and the Fields array. Also
+ // locate the "most appropriate" storage type. The heuristic for finding the
----------------
el-ev wrote:
Removed
https://github.com/llvm/llvm-project/pull/137501
More information about the cfe-commits
mailing list