[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 8 04:14:37 PST 2025


================
@@ -3726,6 +3726,16 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
                             AlignmentCI, OffsetValue);
     return RValue::get(PtrValue);
   }
+  case Builtin::BI__builtin_assume_dereferenceable: {
+    const Expr *Ptr = E->getArg(0);
----------------
fhahn wrote:

Pulled Size out to variable as well, thanks!

https://github.com/llvm/llvm-project/pull/121789


More information about the llvm-commits mailing list