From e3e7446305329ce96e9cf5f5161658eb2e1ea888 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Wed, 8 Jul 2020 12:52:14 -0400 Subject: [PATCH] Add lifetimebound to attributes for general-purpose usage Co-authored-by: practicalswift --- src/attributes.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/attributes.h b/src/attributes.h index 45099bd8b8..9d5c1d44a0 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