aboutsummaryrefslogtreecommitdiff
path: root/src/attributes.h
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2020-07-08 12:52:14 -0400
committerCory Fields <cory-nospam-@coryfields.com>2020-07-08 13:31:56 -0400
commite3e7446305329ce96e9cf5f5161658eb2e1ea888 (patch)
treec0900eade42e5240f87b8ccfb4ea7671e5fd292c /src/attributes.h
parent1d58cc7cb040a70f768b632f294db4e0797d3a34 (diff)
Add lifetimebound to attributes for general-purpose usage
Co-authored-by: practicalswift <practicalswift@users.noreply.github.com>
Diffstat (limited to 'src/attributes.h')
-rw-r--r--src/attributes.h10
1 files changed, 10 insertions, 0 deletions
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