aboutsummaryrefslogtreecommitdiff
path: root/include/lldb/lldb-private-defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/lldb-private-defines.h')
-rw-r--r--include/lldb/lldb-private-defines.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/lldb/lldb-private-defines.h b/include/lldb/lldb-private-defines.h
new file mode 100644
index 000000000000..4b261ad4712b
--- /dev/null
+++ b/include/lldb/lldb-private-defines.h
@@ -0,0 +1,39 @@
+//===-- lldb-private-defines.h ----------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_lldb_private_defines_h_
+#define liblldb_lldb_private_defines_h_
+
+#if defined(__cplusplus)
+
+// Include Compiler.h here so we don't define LLVM_FALLTHROUGH and then Compiler.h
+// later tries to redefine it.
+#include "llvm/Support/Compiler.h"
+
+#ifndef LLVM_FALLTHROUGH
+
+#ifndef __has_cpp_attribute
+# define __has_cpp_attribute(x) 0
+#endif
+
+/// \macro LLVM_FALLTHROUGH
+/// \brief Marks an empty statement preceding a deliberate switch fallthrough.
+#if __has_cpp_attribute(clang::fallthrough)
+#define LLVM_FALLTHROUGH [[clang::fallthrough]]
+#else
+#define LLVM_FALLTHROUGH
+#endif
+
+#endif // ifndef LLVM_FALLTHROUGH
+
+
+
+#endif // #if defined(__cplusplus)
+
+#endif // liblldb_lldb_private_defines_h_