]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/lldb-private-defines.h
Merge ^/head r305346 through r305360.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / lldb-private-defines.h
1 //===-- lldb-private-defines.h ----------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_lldb_private_defines_h_
11 #define liblldb_lldb_private_defines_h_
12
13 #if defined(__cplusplus)
14
15 // Include Compiler.h here so we don't define LLVM_FALLTHROUGH and then Compiler.h
16 // later tries to redefine it.
17 #include "llvm/Support/Compiler.h"
18
19 #ifndef LLVM_FALLTHROUGH
20
21 #ifndef __has_cpp_attribute
22 # define __has_cpp_attribute(x) 0
23 #endif
24
25 /// \macro LLVM_FALLTHROUGH
26 /// \brief Marks an empty statement preceding a deliberate switch fallthrough.
27 #if __has_cpp_attribute(clang::fallthrough)
28 #define LLVM_FALLTHROUGH [[clang::fallthrough]]
29 #else
30 #define LLVM_FALLTHROUGH
31 #endif
32
33 #endif // ifndef LLVM_FALLTHROUGH
34
35
36
37 #endif  // #if defined(__cplusplus)
38
39 #endif  // liblldb_lldb_private_defines_h_