================
@@ -4425,6 +4425,14 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl
GD, unsigned BuiltinID,
Address Dest = EmitPointerWithAlignment(E->getArg(0));
Address Src = EmitPointerWithAlignment(E->getArg(1));
Value *SizeVal = EmitScalarExpr(E->getArg(2));
+ if (BuiltinIDIfNoAsmLabel == Builtin::BI__builtin_trivially_relocate)
+ SizeVal = Builder.CreateMul(
----------------
pcc wrote:
I think an overflow here can only result from a call to
`std::trivially_relocate(first, last, result)` with `first > last`. I feel like
it would probably be better to report the error at the caller so that we can
provide a better error message.
https://github.com/llvm/llvm-project/pull/140312
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits