File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -3607,18 +3607,15 @@ void CodeGenFunction::EmitCheck(
36073607 llvm::Value *RecoverableCond = nullptr ;
36083608 llvm::Value *TrapCond = nullptr ;
36093609 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) {
36123611 // -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;
36193616 Cond = Cond ? Builder.CreateAnd (Cond, Check) : Check;
36203617
3621- if (!CGM.getCodeGenOpts ().SanitizeMergeHandlers .has (Checked[i]. second ))
3618+ if (!CGM.getCodeGenOpts ().SanitizeMergeHandlers .has (Ord ))
36223619 NoMerge = true ;
36233620 }
36243621
You can’t perform that action at this time.
0 commit comments