File tree 1 file changed +6
-9
lines changed
1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -3607,18 +3607,15 @@ void CodeGenFunction::EmitCheck(
3607
3607
llvm::Value *RecoverableCond = nullptr ;
3608
3608
llvm::Value *TrapCond = nullptr ;
3609
3609
bool NoMerge = false ;
3610
- for (int i = 0 , n = Checked.size (); i < n; ++i) {
3611
- llvm::Value *Check = Checked[i].first ;
3610
+ for (auto &[Check, Ord] : Checked) {
3612
3611
// -fsanitize-trap= overrides -fsanitize-recover=.
3613
- llvm::Value *&Cond =
3614
- CGM.getCodeGenOpts ().SanitizeTrap .has (Checked[i].second )
3615
- ? TrapCond
3616
- : CGM.getCodeGenOpts ().SanitizeRecover .has (Checked[i].second )
3617
- ? RecoverableCond
3618
- : FatalCond;
3612
+ llvm::Value *&Cond = CGM.getCodeGenOpts ().SanitizeTrap .has (Ord) ? TrapCond
3613
+ : CGM.getCodeGenOpts ().SanitizeRecover .has (Ord)
3614
+ ? RecoverableCond
3615
+ : FatalCond;
3619
3616
Cond = Cond ? Builder.CreateAnd (Cond, Check) : Check;
3620
3617
3621
- if (!CGM.getCodeGenOpts ().SanitizeMergeHandlers .has (Checked[i]. second ))
3618
+ if (!CGM.getCodeGenOpts ().SanitizeMergeHandlers .has (Ord ))
3622
3619
NoMerge = true ;
3623
3620
}
3624
3621
You can’t perform that action at this time.
0 commit comments