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

Erich Keane via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 08:18:39 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);
----------------
erichkeane wrote:

Any reason this is a separate variable but the Size one doesn't do this?

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


More information about the llvm-commits mailing list