================
@@ -641,3 +654,44 @@ mlir::Value CIRGenFunction::emitVAArg(VAArgExpr *ve) {
   mlir::Value vaList = emitVAListRef(ve->getSubExpr()).getPointer();
   return cir::VAArgOp::create(builder, loc, type, vaList);
 }
+
+/// Returns a Value corresponding to the size of the given expression by
+/// emitting a `cir.objsize` operation.
+///
+/// emittedE is the result of emitting `e` as a scalar expr. If it's non-null,
+/// we'll call `cir.objsize` on emittedE, rather than emitting e.
+mlir::Value CIRGenFunction::emitBuiltinObjectSize(const Expr *e, unsigned type,
+                                                  cir::IntType resType,
+                                                  mlir::Value emittedE,
+                                                  bool isDynamic) {
+  assert(!cir::MissingFeatures::opCallImplicitObjectSizeArgs());
+
+  // LLVM can't handle Type=3 appropriately, and __builtin_object_size 
shouldn't
----------------
andykaylor wrote:

```suggestion
  // LLVM can't handle type=3 appropriately, and __builtin_object_size shouldn't
```

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

Reply via email to