Commit 9c2582ea by Abseil Team Committed by Copybara-Service

Mark absl::Status as ABSL_ATTRIBUTE_TRIVIAL_ABI

This should make it more efficient to pass absl::Status parameters and return values, allowing them to be passed in a register.

PiperOrigin-RevId: 571213728
Change-Id: I2a0183aedc08c270d0af0e7a30a07590ea116896
parent ceea796f
......@@ -37,9 +37,9 @@ ABSL_NAMESPACE_BEGIN
// TODO(b/176172494): ABSL_MUST_USE_RESULT should expand to the more strict
// [[nodiscard]]. For now, just use [[nodiscard]] directly when it is available.
#if ABSL_HAVE_CPP_ATTRIBUTE(nodiscard)
class [[nodiscard]] Status;
class [[nodiscard]] ABSL_ATTRIBUTE_TRIVIAL_ABI Status;
#else
class ABSL_MUST_USE_RESULT Status;
class ABSL_MUST_USE_RESULT ABSL_ATTRIBUTE_TRIVIAL_ABI Status;
#endif
ABSL_NAMESPACE_END
} // namespace absl
......
......@@ -427,7 +427,7 @@ inline StatusToStringMode& operator^=(StatusToStringMode& lhs,
// Returned Status objects may not be ignored. status_internal.h has a forward
// declaration of the form
// class ABSL_MUST_USE_RESULT Status;
class Status final {
class ABSL_ATTRIBUTE_TRIVIAL_ABI Status final {
public:
// Constructors
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment