Skip to content

Commit bd6b27c

Browse files
committed
Address review feedback
1 parent 6ffd93e commit bd6b27c

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,13 @@ struct CIRRecordLowering final {
100100
// Output fields, consumed by CIRGenTypes::computeRecordLayout
101101
llvm::SmallVector<mlir::Type, 16> fieldTypes;
102102
llvm::DenseMap<const FieldDecl *, unsigned> fields;
103-
bool zeroInitializable : 1;
104-
bool packed : 1;
105-
bool padded : 1;
103+
104+
LLVM_PREFERRED_TYPE(bool)
105+
unsigned zeroInitializable : 1;
106+
LLVM_PREFERRED_TYPE(bool)
107+
unsigned packed : 1;
108+
LLVM_PREFERRED_TYPE(bool)
109+
unsigned padded : 1;
106110

107111
private:
108112
CIRRecordLowering(const CIRRecordLowering &) = delete;
@@ -126,6 +130,12 @@ void CIRRecordLowering::lower() {
126130
return;
127131
}
128132

133+
if (isa<CXXRecordDecl>(recordDecl)) {
134+
cirGenTypes.getCGModule().errorNYI(recordDecl->getSourceRange(),
135+
"lower: class");
136+
return;
137+
}
138+
129139
assert(!cir::MissingFeatures::cxxSupport());
130140

131141
accumulateFields();

0 commit comments

Comments
 (0)