From e3e7446305329ce96e9cf5f5161658eb2e1ea888 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Wed, 8 Jul 2020 12:52:14 -0400 Subject: Add lifetimebound to attributes for general-purpose usage Co-authored-by: practicalswift --- src/attributes.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/attributes.h') 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 -- cgit v1.2.3