1 /*===-- llvm-c/Deprecated.h - Deprecation macro -------------------*- C -*-===*\
3 |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
5 |* See https://llvm.org/LICENSE.txt for license information. *|
6 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
8 |*===----------------------------------------------------------------------===*|
10 |* This header declares LLVM_ATTRIBUTE_C_DEPRECATED() macro, which can be *|
11 |* used to deprecate functions in the C interface. *|
13 \*===----------------------------------------------------------------------===*/
15 #ifndef LLVM_C_DEPRECATED_H
16 #define LLVM_C_DEPRECATED_H
19 # define __has_feature(x) 0
22 // This is a variant of LLVM_ATTRIBUTE_DEPRECATED() that is compatible with
24 #if __has_feature(attribute_deprecated_with_message)
25 # define LLVM_ATTRIBUTE_C_DEPRECATED(decl, message) \
26 decl __attribute__((deprecated(message)))
27 #elif defined(__GNUC__)
28 # define LLVM_ATTRIBUTE_C_DEPRECATED(decl, message) \
29 decl __attribute__((deprecated))
30 #elif defined(_MSC_VER)
31 # define LLVM_ATTRIBUTE_C_DEPRECATED(decl, message) \
32 __declspec(deprecated(message)) decl
34 # define LLVM_ATTRIBUTE_C_DEPRECATED(decl, message) \
38 #endif /* LLVM_C_DEPRECATED_H */