summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/demangle/Compiler.h
blob: e5f3c72a4513598ac27e43172285385bd1f37473 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//===--- Compiler.h ---------------------------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
// This file is contains a subset of macros copied from
// llvm/lib/Demangle/Compiler.h.
//===----------------------------------------------------------------------===//

#ifndef LIBCXX_DEMANGLE_COMPILER_H
#define LIBCXX_DEMANGLE_COMPILER_H

#ifdef _MSC_VER
// snprintf is implemented in VS 2015
#if _MSC_VER < 1900
#define snprintf _snprintf_s
#endif
#endif

#ifndef __has_attribute
#define __has_attribute(x) 0
#endif

#ifndef NDEBUG
#if __has_attribute(noinline) && __has_attribute(used)
#define DUMP_METHOD __attribute__((noinline, used))
#else
#define DUMP_METHOD
#endif
#endif

#endif
OpenPOWER on IntegriCloud