pub enum DeadCodeReason {
IfZero,
CppOnly,
AlwaysDefined,
NeverDefined,
}Expand description
Why a DeadCodeRegion is provably never compiled.
Variants§
IfZero
A literal constant condition: the first arm of #if 0, a reached
#elif 0 arm, and every arm after a literal-true one (the
#elif/#else arms of #if 1, or those after an #elif 1 that is
reached).
CppOnly
C++-only branch, dead when the translation unit is built as C.
Covers #ifdef __cplusplus, #if defined(__cplusplus) [&&...], and
the dead #else of #ifndef __cplusplus / #if !defined(__cplusplus).
AlwaysDefined
The macro is #defined on every path to this point with no later
#undef, so the #ifdef/#if defined(MACRO) branch is always
live and its #else is dead. Also produced, under
dead_code_ranges_with_assumptions, when the macro has no local
#define/#undef of its own but the caller’s PlatformAssumptions
asserts it defined.
NeverDefined
The macro is #undefd on every path to this point with no later
#define, so the
#ifdef/#if defined(MACRO) branch itself is dead. Also produced,
under dead_code_ranges_with_assumptions, when the macro has no
local #define/#undef of its own but the caller’s
PlatformAssumptions asserts it undefined.