attributes.h
1 // Copyright (c) 2009-2010 Satoshi Nakamoto 2 // Copyright (c) 2009-present The Bitcoin Core developers 3 // Distributed under the MIT software license, see the accompanying 4 // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 6 #ifndef BITCOIN_ATTRIBUTES_H 7 #define BITCOIN_ATTRIBUTES_H 8 9 #if defined(__clang__) 10 # if __has_attribute(lifetimebound) 11 # define LIFETIMEBOUND [[clang::lifetimebound]] 12 # else 13 # define LIFETIMEBOUND 14 # endif 15 #else 16 # define LIFETIMEBOUND 17 #endif 18 19 #if defined(__GNUC__) 20 # define ALWAYS_INLINE inline __attribute__((always_inline)) 21 #elif defined(_MSC_VER) 22 # define ALWAYS_INLINE __forceinline 23 #else 24 # error No known always_inline attribute for this platform. 25 #endif 26 27 #endif // BITCOIN_ATTRIBUTES_H