llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-compiler-rt-sanitizer Author: Vitaly Buka (vitalybuka) <details> <summary>Changes</summary> --- Full diff: https://github.com/llvm/llvm-project/pull/104403.diff 1 Files Affected: - (modified) compiler-rt/lib/sanitizer_common/sanitizer_common.h (+8-6) ``````````diff diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common.h b/compiler-rt/lib/sanitizer_common/sanitizer_common.h index 2428a8cd14794..182dc8f26c88f 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common.h @@ -239,13 +239,15 @@ void RemoveANSIEscapeSequencesFromString(char *buffer); void Printf(const char *format, ...) FORMAT(1, 2); void Report(const char *format, ...) FORMAT(1, 2); void SetPrintfAndReportCallback(void (*callback)(const char *)); -#define VReport(level, ...) \ - do { \ - if ((uptr)Verbosity() >= (level)) Report(__VA_ARGS__); \ +#define VReport(level, ...) \ + do { \ + if (UNLIKELY((uptr)Verbosity() >= (level))) \ + Report(__VA_ARGS__); \ } while (0) -#define VPrintf(level, ...) \ - do { \ - if ((uptr)Verbosity() >= (level)) Printf(__VA_ARGS__); \ +#define VPrintf(level, ...) \ + do { \ + if (UNLIKELY((uptr)Verbosity() >= (level))) \ + Printf(__VA_ARGS__); \ } while (0) // Lock sanitizer error reporting and protects against nested errors. `````````` </details> https://github.com/llvm/llvm-project/pull/104403 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits