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
16 // Compiler.h later tries to redefine it.
17 #include "llvm/Support/Compiler.h"
19 #ifndef LLVM_FALLTHROUGH
21 #ifndef __has_cpp_attribute
22 #define __has_cpp_attribute(x) 0
25 /// \macro LLVM_FALLTHROUGH
26 /// Marks an empty statement preceding a deliberate switch fallthrough.
27 #if __has_cpp_attribute(clang::fallthrough)
28 #define LLVM_FALLTHROUGH [[clang::fallthrough]]
30 #define LLVM_FALLTHROUGH
33 #endif // ifndef LLVM_FALLTHROUGH
35 #endif // #if defined(__cplusplus)
37 #endif // liblldb_lldb_private_defines_h_