================
@@ -1211,11 +1211,13 @@ llvm::Value *CodeGenFunction::emitCountedByPointerSize(
getContext().getTypeSizeInChars(ElementTy->getPointeeType());
if (ElementSize.isZero()) {
- // This might be a __sized_by on a 'void *', which counts bytes, not
- // elements.
+ // This might be a __sized_by (or __counted_by in GNU mode) on a
+ // 'void *', which counts bytes, not elements.
auto *CAT = ElementTy->getAs<CountAttributedType>();
if (!CAT || (CAT->getKind() != CountAttributedType::SizedBy &&
----------------
kees wrote:
Oh, yes, good point. Those are all the Kinds. :) I'll drop this and implement
the `assert` the FIXME mentions. :)
https://github.com/llvm/llvm-project/pull/164737
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits