diff options
author | Andy Getzendanner <durandal@google.com> | 2023-12-05 14:00:19 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-12-05 14:01:11 -0800 |
commit | 3e6ecec7d3c9c504c9951b34230b22527758e0cd (patch) | |
tree | 66443d2b0f554d0fbe24a0b15c2c968bab4f32e5 /absl/status | |
parent | 71d553b12397ef81e9111b4fa21c68af3c0bf8b9 (diff) |
Roll-forward: 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: 588181755
Change-Id: I95db3bae39f8dadb52a307ca3b80775db23de766
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 7655709b..c84e626f 100644 --- a/absl/status/internal/status_internal.h +++ b/absl/status/internal/status_internal.h @@ -118,6 +118,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); |