================ @@ -6491,14 +6488,8 @@ llvm::DILocation *CodeGenFunction::SanitizerAnnotateDebugInfo( else Label = SanitizerHandlerToCheckLabel(Handler); - for (auto Ord : Ordinals) { - // TODO: deprecate ClArrayBoundsPseudoFn - if (((ClArrayBoundsPseudoFn && Ord == SanitizerKind::SO_ArrayBounds) || - CGM.getCodeGenOpts().SanitizeAnnotateDebugInfo.has(Ord)) && - CheckDebugLoc) { - return DI->CreateSyntheticInlineAt(CheckDebugLoc, Label); - } - } + if (any_of(Ordinals, [&](auto Ord) { return AnnotateDebugInfo.has(Ord); })) ---------------- thurstond wrote:
Arguably, "if no Ord matches" is a precondition / early exit; and, like your earlier checks, avoids the cost of constructing a string for the Label. But up to you, YOLO. https://github.com/llvm/llvm-project/pull/149430 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits