]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/lldb-private-defines.h
Merge ^/head r312309 through r312623.
[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
16 // Compiler.h
17 // later tries to redefine it.
18 #include "llvm/Support/Compiler.h"
19
20 #ifndef LLVM_FALLTHROUGH
21
22 #ifndef __has_cpp_attribute
23 #define __has_cpp_attribute(x) 0
24 #endif
25
26 /// \macro LLVM_FALLTHROUGH
27 /// \brief Marks an empty statement preceding a deliberate switch fallthrough.
28 #if __has_cpp_attribute(clang::fallthrough)
29 #define LLVM_FALLTHROUGH [[clang::fallthrough]]
30 #else
31 #define LLVM_FALLTHROUGH
32 #endif
33
34 #endif // ifndef LLVM_FALLTHROUGH
35
36 #endif // #if defined(__cplusplus)
37
38 #endif // liblldb_lldb_private_defines_h_