aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lldb/include/lldb/lldb-private-defines.h
blob: d66e6ef1518d7c7d7f4f6b19af5cf573ba111238 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//===-- lldb-private-defines.h ----------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLDB_LLDB_PRIVATE_DEFINES_H
#define LLDB_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
/// 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 // LLDB_LLDB_PRIVATE_DEFINES_H