HomePhabricator

[Sema, CodeGen] Implement [[likely]] and [[unlikely]] in SwitchStmt

Authored by Mordante on Sun, Oct 18, 4:34 AM.

Description

[Sema, CodeGen] Implement [[likely]] and [[unlikely]] in SwitchStmt

This implements the likelihood attribute for the switch statement. Based on the
discussion in D85091 and D86559 it only handles the attribute when placed on
the case labels or the default labels.

It also marks the likelihood attribute as feature complete. There are more QoI
patches in the pipeline.

Differential Revision: https://reviews.llvm.org/D89210