diff options
author | Andy Getzendanner <durandal@google.com> | 2023-09-15 15:24:03 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-09-15 15:24:54 -0700 |
commit | 9356553a43ae09ba7760fe7051d7100a1d8efd0b (patch) | |
tree | 1f47573d261e8c05bff90973c8c39f5ace027007 /absl/status | |
parent | f44e2cac7b8b20e1a6f5457714003e6d7022e889 (diff) |
Honor ABSL_MIN_LOG_LEVEL in CHECK_XX, CHECK_STRXX, CHECK_OK, and the QCHECK flavors of these.
In particular, if ABSL_MIN_LOG_LEVEL exceeds kFatal, these should, upon failure, terminate the program without logging anything. The lack of logging should be visible to the optimizer so that it can strip string literals and stringified variable names from the object file.
Making some edge cases work under Clang required rewriting NormalizeLogSeverity to help make constraints on its return value more obvious to the optimizer.
PiperOrigin-RevId: 565792699
Change-Id: Ibb6a47d4956191bbbd0297e04492cddc354578e2
Diffstat (limited to 'absl/status')
-rw-r--r-- | absl/status/internal/status_internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/absl/status/internal/status_internal.h b/absl/status/internal/status_internal.h index 6198e726..f22c611d 100644 --- a/absl/status/internal/status_internal.h +++ b/absl/status/internal/status_internal.h @@ -80,6 +80,7 @@ absl::StatusCode MapToLocalCode(int value); // suitable for output as an error message in assertion/`CHECK()` failures. // // This is an internal implementation detail for Abseil logging. +ABSL_ATTRIBUTE_PURE_FUNCTION std::string* MakeCheckFailString(const absl::Status* status, const char* prefix); |