xref: /aosp_15_r20/external/libcxxabi/src/demangle/Compiler.h (revision c05d8e5dc3e10f6ce4317e8bc22cc4a25f55fa94)
1*c05d8e5dSAndroid Build Coastguard Worker //===--- Compiler.h ---------------------------------------------*- C++ -*-===//
2*c05d8e5dSAndroid Build Coastguard Worker //
3*c05d8e5dSAndroid Build Coastguard Worker //                     The LLVM Compiler Infrastructure
4*c05d8e5dSAndroid Build Coastguard Worker //
5*c05d8e5dSAndroid Build Coastguard Worker // This file is distributed under the University of Illinois Open Source
6*c05d8e5dSAndroid Build Coastguard Worker // License. See LICENSE.TXT for details.
7*c05d8e5dSAndroid Build Coastguard Worker //
8*c05d8e5dSAndroid Build Coastguard Worker // This file is contains a subset of macros copied from
9*c05d8e5dSAndroid Build Coastguard Worker // llvm/lib/Demangle/Compiler.h.
10*c05d8e5dSAndroid Build Coastguard Worker //===----------------------------------------------------------------------===//
11*c05d8e5dSAndroid Build Coastguard Worker 
12*c05d8e5dSAndroid Build Coastguard Worker #ifndef LIBCXX_DEMANGLE_COMPILER_H
13*c05d8e5dSAndroid Build Coastguard Worker #define LIBCXX_DEMANGLE_COMPILER_H
14*c05d8e5dSAndroid Build Coastguard Worker 
15*c05d8e5dSAndroid Build Coastguard Worker #ifdef _MSC_VER
16*c05d8e5dSAndroid Build Coastguard Worker // snprintf is implemented in VS 2015
17*c05d8e5dSAndroid Build Coastguard Worker #if _MSC_VER < 1900
18*c05d8e5dSAndroid Build Coastguard Worker #define snprintf _snprintf_s
19*c05d8e5dSAndroid Build Coastguard Worker #endif
20*c05d8e5dSAndroid Build Coastguard Worker #endif
21*c05d8e5dSAndroid Build Coastguard Worker 
22*c05d8e5dSAndroid Build Coastguard Worker #ifndef __has_attribute
23*c05d8e5dSAndroid Build Coastguard Worker #define __has_attribute(x) 0
24*c05d8e5dSAndroid Build Coastguard Worker #endif
25*c05d8e5dSAndroid Build Coastguard Worker 
26*c05d8e5dSAndroid Build Coastguard Worker #ifndef NDEBUG
27*c05d8e5dSAndroid Build Coastguard Worker #if __has_attribute(noinline) && __has_attribute(used)
28*c05d8e5dSAndroid Build Coastguard Worker #define DUMP_METHOD __attribute__((noinline, used))
29*c05d8e5dSAndroid Build Coastguard Worker #else
30*c05d8e5dSAndroid Build Coastguard Worker #define DUMP_METHOD
31*c05d8e5dSAndroid Build Coastguard Worker #endif
32*c05d8e5dSAndroid Build Coastguard Worker #endif
33*c05d8e5dSAndroid Build Coastguard Worker 
34*c05d8e5dSAndroid Build Coastguard Worker #endif
35