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