[clang] [CIR] Add pass_object_size hidden parameter support (PR #191482)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 15 12:10:21 PDT 2026
================
@@ -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);
----------------
adams381 wrote:
Done -- added a BOSType enum with named constants and rewrote the function to use them.
https://github.com/llvm/llvm-project/pull/191482
More information about the cfe-commits
mailing list