A new kind BTF_KIND_TYPE_TAG is defined. The tags associated with a pointer type are emitted in their IR order as modifiers. For example, for the following declaration: int __tag1 * __tag1 __tag2 *g; The BTF type chain will look like VAR(g) -> __tag1 --> __tag2 -> pointer -> __tag1 -> pointer -> int In the above "->" means BTF CommonType.Type which indicates the point-to type. Differential Revision: https://reviews.llvm.org/D113222
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
//===- BTF.def - BTF definitions --------------------------------*- 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Macros for BTF.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#if !defined(HANDLE_BTF_KIND)
|
|
#error "Missing macro definition of HANDLE_BTF_*"
|
|
#endif
|
|
|
|
HANDLE_BTF_KIND(0, UNKN)
|
|
HANDLE_BTF_KIND(1, INT)
|
|
HANDLE_BTF_KIND(2, PTR)
|
|
HANDLE_BTF_KIND(3, ARRAY)
|
|
HANDLE_BTF_KIND(4, STRUCT)
|
|
HANDLE_BTF_KIND(5, UNION)
|
|
HANDLE_BTF_KIND(6, ENUM)
|
|
HANDLE_BTF_KIND(7, FWD)
|
|
HANDLE_BTF_KIND(8, TYPEDEF)
|
|
HANDLE_BTF_KIND(9, VOLATILE)
|
|
HANDLE_BTF_KIND(10, CONST)
|
|
HANDLE_BTF_KIND(11, RESTRICT)
|
|
HANDLE_BTF_KIND(12, FUNC)
|
|
HANDLE_BTF_KIND(13, FUNC_PROTO)
|
|
HANDLE_BTF_KIND(14, VAR)
|
|
HANDLE_BTF_KIND(15, DATASEC)
|
|
HANDLE_BTF_KIND(16, FLOAT)
|
|
HANDLE_BTF_KIND(17, DECL_TAG)
|
|
HANDLE_BTF_KIND(18, TYPE_TAG)
|
|
|
|
#undef HANDLE_BTF_KIND
|