LLVM 20.0.0git
CodeGenData.inc
Go to the documentation of this file.
1/*===-- CodeGenData.inc ----------------------------------------*- C++ -*-=== *\
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\*===----------------------------------------------------------------------===*/
8/*
9 * This is the main file that defines all the data structure, signature,
10 * constant literals that are shared across compiler, host tools (reader/writer)
11 * to support codegen data.
12 *
13\*===----------------------------------------------------------------------===*/
14
15/* Helper macros. */
16#define CG_DATA_SIMPLE_QUOTE(x) #x
17#define CG_DATA_QUOTE(x) CG_DATA_SIMPLE_QUOTE(x)
18
19#ifdef CG_DATA_SECT_ENTRY
20#define CG_DATA_DEFINED
21CG_DATA_SECT_ENTRY(CG_outline, CG_DATA_QUOTE(CG_DATA_OUTLINE_COMMON),
22 CG_DATA_OUTLINE_COFF, "__DATA,")
23CG_DATA_SECT_ENTRY(CG_merge, CG_DATA_QUOTE(CG_DATA_MERGE_COMMON),
24 CG_DATA_MERGE_COFF, "__DATA,")
25
26#undef CG_DATA_SECT_ENTRY
27#endif
28
29/* section name strings common to all targets other
30 than WIN32 */
31#define CG_DATA_OUTLINE_COMMON __llvm_outline
32#define CG_DATA_MERGE_COMMON __llvm_merge
33/* Since cg data sections are not allocated, we don't need to
34 * access them at runtime.
35 */
36#define CG_DATA_OUTLINE_COFF ".loutline"
37#define CG_DATA_MERGE_COFF ".lmerge"
38
39#ifdef _WIN32
40/* Runtime section names and name strings. */
41#define CG_DATA_OUTLINE_SECT_NAME CG_DATA_OUTLINE_COFF
42#define CG_DATA_MERGE_SECT_NAME CG_DATA_MERGE_COFF
43
44#else
45/* Runtime section names and name strings. */
46#define CG_DATA_OUTLINE_SECT_NAME CG_DATA_QUOTE(CG_DATA_OUTLINE_COMMON)
47#define CG_DATA_MERGE_SECT_NAME CG_DATA_QUOTE(CG_DATA_MERGE_COMMON)
48
49#endif
50
51/* Indexed codegen data format version (start from 1). */
52#define CG_DATA_INDEX_VERSION 2
#define CG_DATA_SECT_ENTRY(Kind, SectNameCommon, SectNameCoff, Prefix)
Definition: CodeGenData.h:33