aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/clang14/include/clang-c/Platform.h
blob: a94b331cbc165b75100deae1b34cd2ed29e329f8 (plain) (blame)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#pragma once

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif

/*===-- clang-c/Platform.h - C Index platform decls   -------------*- C -*-===*\
|*                                                                            *|
|* Part of the LLVM Project, under the Apache License v2.0 with LLVM          *|
|* Exceptions.                                                                *|
|* See https://llvm.org/LICENSE.txt for license information.                  *|
|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    *|
|*                                                                            *|
|*===----------------------------------------------------------------------===*|
|*                                                                            *|
|* This header provides platform specific macros (dllimport, deprecated, ...) *|
|*                                                                            *|
\*===----------------------------------------------------------------------===*/

#ifndef LLVM_CLANG_C_PLATFORM_H
#define LLVM_CLANG_C_PLATFORM_H

#include "clang-c/ExternC.h"

LLVM_CLANG_C_EXTERN_C_BEGIN

/* Windows DLL import/export. */
#ifndef CINDEX_NO_EXPORTS
  #define CINDEX_EXPORTS
#endif
#ifdef _WIN32
  #ifdef CINDEX_EXPORTS
    #ifdef _CINDEX_LIB_
      #define CINDEX_LINKAGE __declspec(dllexport)
    #else
      #define CINDEX_LINKAGE __declspec(dllimport)
    #endif
  #endif
#elif defined(CINDEX_EXPORTS) && defined(__GNUC__)
  #define CINDEX_LINKAGE __attribute__((visibility("default")))
#endif

#ifndef CINDEX_LINKAGE
  #define CINDEX_LINKAGE
#endif

#ifdef __GNUC__
  #define CINDEX_DEPRECATED __attribute__((deprecated))
#else
  #ifdef _MSC_VER
    #define CINDEX_DEPRECATED __declspec(deprecated)
  #else
    #define CINDEX_DEPRECATED
  #endif
#endif

LLVM_CLANG_C_EXTERN_C_END

#endif

#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif