From e24719f6e73a89da8877536830ff047ffc4e2377 Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Wed, 6 Jul 2011 22:07:59 +0000 Subject: * incremental.cc (Sized_incremental_binary::setup_readers): Pass input file index to Script_info ctor. (Sized_incremental_binary::do_file_has_changed): Find the command-line argument for files named in scripts. * incremental.h (Script_info::Script_info): New ctor with input file index. (Script_info::input_file_index): New function. (Script_info::input_file_index_): New data member. (Incremental_binary::get_library): Add const. (Incremental_binary::get_script_info): Add const. * readsyms.cc (Read_member::is_runnable): Check for this_blocker_. * testsuite/Makefile.am (incremental_test_5): New test case. (incremental_test_6): New test case. * testsuite/Makefile.in: Regenerate. --- gold/incremental.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'gold/incremental.h') diff --git a/gold/incremental.h b/gold/incremental.h index 3bd2a31..1e4d9f5 100644 --- a/gold/incremental.h +++ b/gold/incremental.h @@ -46,7 +46,6 @@ class Incremental_inputs; class Incremental_binary; class Incremental_library; class Object; -class Script_info; // Incremental input type as stored in .gnu_incremental_inputs. @@ -259,7 +258,13 @@ class Script_info { public: Script_info(const std::string& filename) - : filename_(filename), incremental_script_entry_(NULL) + : filename_(filename), input_file_index_(0), + incremental_script_entry_(NULL) + { } + + Script_info(const std::string& filename, unsigned int input_file_index) + : filename_(filename), input_file_index_(input_file_index), + incremental_script_entry_(NULL) { } // Store a pointer to the incremental information for this script. @@ -272,6 +277,11 @@ class Script_info filename() const { return this->filename_; } + // Return the input file index. + unsigned int + input_file_index() const + { return this->input_file_index_; } + // Return the pointer to the incremental information for this script. Incremental_script_entry* incremental_info() const @@ -279,6 +289,7 @@ class Script_info private: const std::string filename_; + unsigned int input_file_index_; Incremental_script_entry* incremental_script_entry_; }; @@ -1403,12 +1414,12 @@ class Incremental_binary // Return an Incremental_library for the given input file. Incremental_library* - get_library(unsigned int n) + get_library(unsigned int n) const { return this->library_map_[n]; } // Return a Script_info for the given input file. Script_info* - get_script_info(unsigned int n) + get_script_info(unsigned int n) const { return this->script_map_[n]; } // Initialize the layout of the output file based on the existing -- cgit v1.1