1 //===-- lldb-private-defines.h ----------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_lldb_private_defines_h_
11 #define liblldb_lldb_private_defines_h_
13 #if defined(__cplusplus)
15 // Include Compiler.h here so we don't define LLVM_FALLTHROUGH and then
17 // later tries to redefine it.
18 #include "llvm/Support/Compiler.h"
20 #ifndef LLVM_FALLTHROUGH
22 #ifndef __has_cpp_attribute
23 #define __has_cpp_attribute(x) 0
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]]
31 #define LLVM_FALLTHROUGH
34 #endif // ifndef LLVM_FALLTHROUGH
36 #endif // #if defined(__cplusplus)
38 #endif // liblldb_lldb_private_defines_h_