Go to the documentation of this file. 14 #ifndef LLVM_DEMANGLE_COMPILER_H 15 #define LLVM_DEMANGLE_COMPILER_H 20 #define snprintf _snprintf_s 25 #define __has_feature(x) 0 28 #ifndef __has_cpp_attribute 29 #define __has_cpp_attribute(x) 0 32 #ifndef __has_attribute 33 #define __has_attribute(x) 0 37 #define __has_builtin(x) 0 40 #ifndef LLVM_GNUC_PREREQ 41 #if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) 42 #define LLVM_GNUC_PREREQ(maj, min, patch) \ 43 ((__GNUC__ << 20) + (__GNUC_MINOR__ << 10) + __GNUC_PATCHLEVEL__ >= \ 44 ((maj) << 20) + ((min) << 10) + (patch)) 45 #elif defined(__GNUC__) && defined(__GNUC_MINOR__) 46 #define LLVM_GNUC_PREREQ(maj, min, patch) \ 47 ((__GNUC__ << 20) + (__GNUC_MINOR__ << 10) >= ((maj) << 20) + ((min) << 10)) 49 #define LLVM_GNUC_PREREQ(maj, min, patch) 0 53 #if __has_attribute(used) || LLVM_GNUC_PREREQ(3, 1, 0) 54 #define LLVM_ATTRIBUTE_USED __attribute__((__used__)) 56 #define LLVM_ATTRIBUTE_USED 59 #if __has_builtin(__builtin_unreachable) || LLVM_GNUC_PREREQ(4, 5, 0) 60 #define LLVM_BUILTIN_UNREACHABLE __builtin_unreachable() 61 #elif defined(_MSC_VER) 62 #define LLVM_BUILTIN_UNREACHABLE __assume(false) 65 #if __has_attribute(noinline) || LLVM_GNUC_PREREQ(3, 4, 0) 66 #define LLVM_ATTRIBUTE_NOINLINE __attribute__((noinline)) 67 #elif defined(_MSC_VER) 68 #define LLVM_ATTRIBUTE_NOINLINE __declspec(noinline) 70 #define LLVM_ATTRIBUTE_NOINLINE 73 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 74 #define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED 76 #define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE 79 #if __cplusplus > 201402L && __has_cpp_attribute(fallthrough) 80 #define LLVM_FALLTHROUGH [[fallthrough]] 81 #elif __has_cpp_attribute(gnu::fallthrough) 82 #define LLVM_FALLTHROUGH [[gnu::fallthrough]] 86 #define LLVM_FALLTHROUGH 87 #elif __has_cpp_attribute(clang::fallthrough) 88 #define LLVM_FALLTHROUGH [[clang::fallthrough]] 90 #define LLVM_FALLTHROUGH