[llvm] r191310 - Teach MemoryBuiltins and InstructionSimplify that operator new never returns NULL.
wendling at apple.com
Tue Sep 24 13:20:49 PDT 2013
On Sep 24, 2013, at 11:43 AM, Benjamin Kramer <benny.kra at gmail.com> wrote:
> On 24.09.2013, at 20:10, Bill Wendling <wendling at apple.com> wrote:
>> On Sep 24, 2013, at 9:37 AM, Benjamin Kramer <benny.kra at googlemail.com> wrote:
>>> Author: d0k
>>> Date: Tue Sep 24 11:37:51 2013
>>> New Revision: 191310
>>> URL: http://llvm.org/viewvc/llvm-project?rev=191310&view=rev
>>> Teach MemoryBuiltins and InstructionSimplify that operator new never returns NULL.
>>> This is safe per C++11 18.104.22.168p3: [operator new returns] a non-null pointer to
>>> suitably aligned storage (3.7.4), or else throw a bad_alloc exception. This
>>> requirement is binding on a replacement version of this function.
>> Just checking, but I assume that you mean the operator new that can throw never returns null. (The no-throw operator new may return null.) Could you modify the test case to ensure that the no-throw operator new isn't affected by this change? :-)
> r191325 adds a test for operator new with nothrow_t.
More information about the llvm-commits