]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/lldb/include/lldb/lldb-private-defines.h
Merge ^/vendor/lldb/dist up to its last change, and resolve conflicts.
[FreeBSD/FreeBSD.git] / contrib / llvm-project / lldb / include / lldb / lldb-private-defines.h
1 //===-- lldb-private-defines.h ----------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM 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 #ifndef liblldb_lldb_private_defines_h_
10 #define liblldb_lldb_private_defines_h_
11
12 #if defined(__cplusplus)
13
14 // Include Compiler.h here so we don't define LLVM_FALLTHROUGH and then
15 // Compiler.h later tries to redefine it.
16 #include "llvm/Support/Compiler.h"
17
18 #ifndef LLVM_FALLTHROUGH
19
20 #ifndef __has_cpp_attribute
21 #define __has_cpp_attribute(x) 0
22 #endif
23
24 /// \macro LLVM_FALLTHROUGH
25 /// Marks an empty statement preceding a deliberate switch fallthrough.
26 #if __has_cpp_attribute(clang::fallthrough)
27 #define LLVM_FALLTHROUGH [[clang::fallthrough]]
28 #else
29 #define LLVM_FALLTHROUGH
30 #endif
31
32 #endif // ifndef LLVM_FALLTHROUGH
33
34 #endif // #if defined(__cplusplus)
35
36 #endif // liblldb_lldb_private_defines_h_