Base: Remove LOG_S variants.
Partially reverts commit 436f5a031f3dfa195919be36873300a221376b53.
Remove the variants taking a fully qualified LogSeverity. Instead
use a lambda with "using" statements to translate both qualified
and unqualified names into valid expressions.
Compile-time regression was measured as 0.1s for a thousand LOG
statements on a z840.
Update tests.
Bug: 31338270
Test: m
Test: mmma system/core/base && $ANDROID_HOST_OUT/nativetest64/libbase_test/libbase_test64
Change-Id: I36fdf30a9d535b19543307b85d1b3c19a97f20dd
diff --git a/base/logging.cpp b/base/logging.cpp
index 2ca2246..eaed9ab 100644
--- a/base/logging.cpp
+++ b/base/logging.cpp
@@ -391,7 +391,7 @@
LogMessage::~LogMessage() {
// Check severity again. This is duplicate work wrt/ LOG macros, but not LOG_STREAM.
- if (!WOULD_LOG_SEVERITY(data_->GetSeverity())) {
+ if (!WOULD_LOG(data_->GetSeverity())) {
return;
}