llvm-project
4bce2148 - Ensure !NDEBUG with LLVM_ENABLE_ABI_BREAKING_CHECKS does not segfault (#113588)

Commit
1 year ago
Ensure !NDEBUG with LLVM_ENABLE_ABI_BREAKING_CHECKS does not segfault (#113588) In SelectionDAG, `TargetTransformInfo::hasBranchDivergence()` can be called when both `NDEBUG` and `LLVM_ENABLE_ABI_BREAKING_CHECKS` are enabled. In that case, the class member `TTI` is still initialized to `nullptr`, causing a segfault. Fix this by ensuring that all the calls to `hasBranchDivergence` and `VerifyDAGDivergence` only occur when `NDEBUG` is disabled, and `LLVM_ENABLE_ABI_BREAKING_CHECKS` is enabled.
Author
Parents
Loading