Path: blob/main/contrib/llvm-project/llvm/include/llvm-c/Deprecated.h
35233 views
/*===-- llvm-c/Deprecated.h - Deprecation macro -------------------*- C -*-===*\1|* *|2|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|3|* Exceptions. *|4|* See https://llvm.org/LICENSE.txt for license information. *|5|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|6|* *|7|*===----------------------------------------------------------------------===*|8|* *|9|* This header declares LLVM_ATTRIBUTE_C_DEPRECATED() macro, which can be *|10|* used to deprecate functions in the C interface. *|11|* *|12\*===----------------------------------------------------------------------===*/1314#ifndef LLVM_C_DEPRECATED_H15#define LLVM_C_DEPRECATED_H1617#ifndef __has_feature18# define __has_feature(x) 019#endif2021// This is a variant of LLVM_ATTRIBUTE_DEPRECATED() that is compatible with22// C compilers.23#if __has_feature(attribute_deprecated_with_message)24# define LLVM_ATTRIBUTE_C_DEPRECATED(decl, message) \25decl __attribute__((deprecated(message)))26#elif defined(__GNUC__)27# define LLVM_ATTRIBUTE_C_DEPRECATED(decl, message) \28decl __attribute__((deprecated))29#elif defined(_MSC_VER)30# define LLVM_ATTRIBUTE_C_DEPRECATED(decl, message) \31__declspec(deprecated(message)) decl32#else33# define LLVM_ATTRIBUTE_C_DEPRECATED(decl, message) \34decl35#endif3637#endif /* LLVM_C_DEPRECATED_H */383940