================
@@ -2578,11 +2578,33 @@ mlir::Value CIRGenFunction::emitVAArg(VAArgExpr *ve) {
   return cir::VAArgOp::create(builder, loc, type, vaList);
 }
 
+/// Checks if using the result of __builtin_object_size(p, @p from) in place of
+/// __builtin_object_size(p, @p to) is correct.
+static bool areBOSTypesCompatible(int from, int to) {
+  return from == to || (from == 0 && to == 1) || (from == 3 && to == 2);
----------------
andykaylor wrote:

Classic codegen has a comment about this. Can you add that here? A comment that 
actually explains what this comparison means would also be helpful.

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

Reply via email to