]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/lto.h
Update copyright years.
[thirdparty/gcc.git] / gcc / lto / lto.h
CommitLineData
d7f09764 1/* LTO declarations.
a5544970 2 Copyright (C) 2009-2019 Free Software Foundation, Inc.
d7f09764
DN
3 Contributed by CodeSourcery, Inc.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
9Software Foundation; either version 3, or (at your option) any later
10version.
11
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
20
21#ifndef LTO_H
22#define LTO_H
23
d7f09764
DN
24
25/* A file. */
a79683d5 26struct lto_file
d7f09764
DN
27{
28 /* The name of the file. */
29 const char *filename;
c082f9f3 30 /* The offset for the object inside an ar archive file (or zero). */
9870fe4f 31 off_t offset;
a79683d5 32};
d7f09764
DN
33
34/* In lto-lang.c */
35extern const char *resolution_file_name;
36
37/* In lto.c */
7951d88a 38extern tree lto_eh_personality (void);
b37421c6 39extern void lto_main (void);
d7f09764
DN
40extern void lto_read_all_file_options (void);
41
2cee0101
DK
42/* In lto-elf.c or lto-coff.c */
43extern lto_file *lto_obj_file_open (const char *filename, bool writable);
44extern void lto_obj_file_close (lto_file *file);
c17d253c
AK
45struct lto_section_list;
46extern htab_t lto_obj_build_section_table (lto_file *file, struct lto_section_list *list);
fbbc5704 47extern htab_t lto_obj_create_section_hash_table (void);
2cee0101
DK
48extern void lto_obj_begin_section (const char *name);
49extern void lto_obj_append_data (const void *data, size_t len, void *block);
50extern void lto_obj_end_section (void);
d7f09764
DN
51extern lto_file *lto_set_current_out_file (lto_file *file);
52extern lto_file *lto_get_current_out_file (void);
53
29a50dfb
JH
54extern int lto_link_dump_id, decl_merge_dump_id, partition_dump_id;
55
d7f09764
DN
56/* Hash table entry to hold the start offset and length of an LTO
57 section in a .o file. */
58struct lto_section_slot
59{
60 const char *name;
61 intptr_t start;
62 size_t len;
c17d253c
AK
63 struct lto_section_slot *next;
64};
65
66/* A list of section slots */
67struct lto_section_list
68{
69 struct lto_section_slot *first, *last;
d7f09764
DN
70};
71
d7f09764 72#endif /* LTO_H */