[clang] Avoid linking libdl unless needed
[llvm-project.git] / libc / src / __support / common.h.def
bloba1bb78d5b00f4eec9e7ddc101d56d91f1d4230f3
1 //===-- Common internal contructs -----------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIBC_SUPPORT_COMMON_H
10 #define LLVM_LIBC_SUPPORT_COMMON_H
12 #define LIBC_INLINE_ASM __asm__ __volatile__
14 #define likely(x) __builtin_expect (!!(x), 1)
15 #define unlikely(x) __builtin_expect (x, 0)
16 #define UNUSED __attribute__((unused))
18 <!> Include the platform specific definitions at build time. For example, that
19 <!> of entrypoint macro.
20 %%include_file(${platform_defs})
22 #endif // LLVM_LIBC_SUPPORT_COMMON_H