Make `SAPI_RAW_LOG(FATAL, ...)` noreturn

PiperOrigin-RevId: 517941912
Change-Id: I655aaf7101c566f8f01c1a5296539186701a10de
pull/171/head
Wiktor Garbacz 2023-03-20 05:42:28 -07:00 committed by Copybara-Service
parent 10b89d4d33
commit 9867ce3beb
4 changed files with 7 additions and 5 deletions

View File

@ -14,7 +14,7 @@
FetchContent_Declare(absl
GIT_REPOSITORY https://github.com/abseil/abseil-cpp
GIT_TAG ab2e2c4f6062999afaf960759dfccb77f350c702 # 2022-09-15
GIT_TAG efeb95f4491740817a1c37345b66d26bce722ae4 # 2023-03-20
)
set(ABSL_CXX_STANDARD ${SAPI_CXX_STANDARD} CACHE STRING "" FORCE)
set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE)

View File

@ -37,9 +37,9 @@ def sapi_deps():
maybe(
http_archive,
name = "com_google_absl",
sha256 = "ef76248ccea6dd05762cfdc9a5b234222e1f3b38d31325e35d4172559eac7935", # 2022-09-15
strip_prefix = "abseil-cpp-ab2e2c4f6062999afaf960759dfccb77f350c702",
urls = ["https://github.com/abseil/abseil-cpp/archive/ab2e2c4f6062999afaf960759dfccb77f350c702.zip"],
sha256 = "adca6c26a90d6791e36bfe5dbc8573182c5fa0726da29901a6b3949d65116e25", # 2023-03-20
strip_prefix = "abseil-cpp-efeb95f4491740817a1c37345b66d26bce722ae4",
urls = ["https://github.com/abseil/abseil-cpp/archive/efeb95f4491740817a1c37345b66d26bce722ae4.zip"],
)
maybe(
http_archive,

View File

@ -64,7 +64,6 @@ absl::string_view GetOutsidePath(const MountTree::Node& node) {
return node.dir_node().outside();
default:
SAPI_RAW_LOG(FATAL, "Invalid node type");
return ""; // NOT REACHED
}
}

View File

@ -56,6 +56,9 @@
::sapi::raw_logging_internal::RawLog(SAPI_RAW_LOGGING_INTERNAL_##severity, \
absl_raw_logging_internal_basename, \
__LINE__, __VA_ARGS__); \
if (SAPI_RAW_LOGGING_INTERNAL_##severity == ::absl::LogSeverity::kFatal) { \
ABSL_UNREACHABLE(); \
} \
} while (0)
#endif