blob: 190062645ec4d1681df36d70eac10d5bd20d4902 [file] [log] [blame]
//===--- 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