* incremental.cc (Incremental_inputs_header_data): Renamed from
[deliverable/binutils-gdb.git] / gold / incremental.h
1 // inremental.h -- incremental linking support for gold -*- C++ -*-
2
3 // Copyright 2009 Free Software Foundation, Inc.
4 // Written by Mikolaj Zalewski <mikolajz@google.com>.
5
6 // This file is part of gold.
7
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 3 of the License, or
11 // (at your option) any later version.
12
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21 // MA 02110-1301, USA.
22
23 #ifndef GOLD_INCREMENTAL_H
24 #define GOLD_INCREMENTAL_H
25
26 #include <vector>
27
28 #include "stringpool.h"
29 #include "workqueue.h"
30
31 namespace gold
32 {
33
34 class Archive;
35 class Input_argument;
36 class Incremental_inputs_checker;
37 class Object;
38 class Output_section_data;
39
40 // This class contains the information needed during an incremental
41 // build about the inputs necessary to build the .gnu_incremental_inputs.
42 class Incremental_inputs
43 {
44 public:
45 Incremental_inputs()
46 : command_line_key_(0), strtab_(new Stringpool())
47 { }
48 ~Incremental_inputs() { delete this->strtab_; }
49
50 // Record the command line.
51 void
52 report_command_line(int argc, const char* const* argv);
53
54 // Prepare for layout. Called from Layout::finalize.
55 void
56 finalize();
57
58 // Create the content of the .gnu_incremental_inputs section.
59 Output_section_data*
60 create_incremental_inputs_section_data();
61
62 // Return the .gnu_incremental_strtab stringpool.
63 Stringpool*
64 get_stringpool()
65 { return this->strtab_; }
66
67 private:
68 // Code for each of the four possible variants of create_inputs_section_data.
69 template<int size, bool big_endian>
70 Output_section_data*
71 sized_create_inputs_section_data();
72
73 // The key of the command line string in the string pool.
74 Stringpool::Key command_line_key_;
75 // The .gnu_incremental_strtab string pool associated with the
76 // .gnu_incremental_inputs.
77 Stringpool* strtab_;
78 };
79
80 } // End namespace gold.
81
82 #endif // !defined(GOLD_INCREMENTAL_H)
This page took 0.031034 seconds and 5 git commands to generate.