Skip to content
Commit b46fddf7 authored by Mark de Wever's avatar Mark de Wever
Browse files

[CodeGen] Implement [[likely]] and [[unlikely]] for while and for loop.

The attribute has no effect on a do statement since the path of execution
will always include its substatement.

It adds a diagnostic when the attribute is used on an infinite while loop
since the codegen omits the branch here. Since the likelihood attributes
have no effect on a do statement no diagnostic will be issued for
do [[unlikely]] {...} while(0);

Differential Revision: https://reviews.llvm.org/D89899
parent ef6f6d1c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment