[all-commits] [llvm/llvm-project] 21765a: [C++] [Coroutines] Assume the allocation doesn't r...
Chuanqi Xu via All-commits
all-commits at lists.llvm.org
Sun Jun 25 23:38:44 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 21765af763f163e6c87f63d3c1dbc32b06119f60
https://github.com/llvm/llvm-project/commit/21765af763f163e6c87f63d3c1dbc32b06119f60
Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
Date: 2023-06-26 (Mon, 26 Jun 2023)
Changed paths:
M clang/lib/CodeGen/CGCoroutine.cpp
M clang/test/CodeGenCoroutines/coro-alloc.cpp
Log Message:
-----------
[C++] [Coroutines] Assume the allocation doesn't return nullptr
In case of 'get_return_object_on_allocation_failure' get declared, the
compiler is required to call 'operator new(size_t, nothrow_t)' and the
handle the failure case by calling
'get_return_object_on_allocation_failure()'. But the failure case should
be rare and we can assume the allocation is successful and pass the
information to the optimizer.
More information about the All-commits
mailing list