Skip to content

Commit cac5d0e

Browse files
authored
[CodeGen] Fix compiler conditional combination (#94297)
Previously this assumed that `LLVM_ENABLE_ABI_BREAKING_CHECKS` would always be enabled in this case, if it's not `TTI` does not exist. Introduced in 7652a59
1 parent fbdd948 commit cac5d0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ void SelectionDAGISel::initializeAnalysisResults(
536536

537537
SP = &FAM.getResult<SSPLayoutAnalysis>(Fn);
538538

539-
#ifndef NDEBUG
539+
#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS
540540
TTI = &FAM.getResult<TargetIRAnalysis>(Fn);
541541
#endif
542542
}
@@ -590,7 +590,7 @@ void SelectionDAGISel::initializeAnalysisResults(MachineFunctionPass &MFP) {
590590

591591
SP = &MFP.getAnalysis<StackProtector>().getLayoutInfo();
592592

593-
#ifndef NDEBUG
593+
#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS
594594
TTI = &MFP.getAnalysis<TargetTransformInfoWrapperPass>().getTTI(Fn);
595595
#endif
596596
}

0 commit comments

Comments
 (0)