From 1be361a16ea4151ada6092006dd8dd732492849f Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <6098974-kittywhiskers@users.noreply.gitlab.com> Date: Tue, 23 Mar 2021 09:52:32 +0530 Subject: [PATCH] Merge bitcoin#19387: Add lifetimebound to attributes for general-purpose usage https://github.com/bitcoin/bitcoin/commit/e3e7446305329ce96e9cf5f5161658eb2e1ea888 --- src/attributes.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/attributes.h b/src/attributes.h index 45099bd8b88025..9d5c1d44a04c53 100644 --- a/src/attributes.h +++ b/src/attributes.h @@ -19,4 +19,14 @@ # endif #endif +#if defined(__clang__) +# if __has_attribute(lifetimebound) +# define LIFETIMEBOUND [[clang::lifetimebound]] +# else +# define LIFETIMEBOUND +# endif +#else +# define LIFETIMEBOUND +#endif + #endif // BITCOIN_ATTRIBUTES_H