aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/clang14/include/clang/Basic/BuiltinsBPF.def
blob: 190062645ec4d1681df36d70eac10d5bd20d4902 (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
//===--- BuiltinsBPF.def - BPF Builtin function database --------*- 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
//
//===----------------------------------------------------------------------===//
//
// This file defines the BPF-specific builtin function database.  Users of
// this file must define the BUILTIN macro to make use of this information.
//
//===----------------------------------------------------------------------===//

// The format of this database matches clang/Basic/Builtins.def.

#if defined(BUILTIN) && !defined(TARGET_BUILTIN)
#   define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BUILTIN(ID, TYPE, ATTRS)
#endif

// Get record field information.
TARGET_BUILTIN(__builtin_preserve_field_info, "Ui.", "t", "")

// Get BTF type id.
TARGET_BUILTIN(__builtin_btf_type_id, "LUi.", "t", "")

// Get type information.
TARGET_BUILTIN(__builtin_preserve_type_info, "Ui.", "t", "")

// Preserve enum value.
TARGET_BUILTIN(__builtin_preserve_enum_value, "Li.", "t", "")

#undef BUILTIN
#undef TARGET_BUILTIN