================
@@ -1487,6 +1487,14 @@ BitFieldType::getABIAlignment(const mlir::DataLayout
&dataLayout,
return 1;
}
+std::optional<uint64_t> BitFieldType::getDeclaredExtentInBits(
+ const mlir::DataLayout &dataLayout) const {
+ if (getFields().size() != 1)
+ return std::nullopt;
+ return dataLayout.getTypeSizeInBits(getFields().front().getDeclaredType())
----------------
andykaylor wrote:
Yes, if the function only gets the extent if there is only one field, I think
the function name should reflect that.
https://github.com/llvm/llvm-project/pull/222108
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits