aboutsummaryrefslogtreecommitdiff
path: root/gold/fileread.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2012-10-23 21:29:20 +0000
committerCary Coutant <ccoutant@google.com>2012-10-23 21:29:20 +0000
commiteffe83657d4a26ab1f3132152dae212e54e66a04 (patch)
treec6e7eeb4bb551dcb820ae735b2a1e5e36d410c03 /gold/fileread.cc
parent274bd0009d29e1f97339aa8ce247ffe11a4e86e2 (diff)
downloadgdb-effe83657d4a26ab1f3132152dae212e54e66a04.zip
gdb-effe83657d4a26ab1f3132152dae212e54e66a04.tar.gz
gdb-effe83657d4a26ab1f3132152dae212e54e66a04.tar.bz2
gold/
* fileread.cc (Input_file::Input_file): New constructor. * fileread.h (class Input_file): Add new constructor.
Diffstat (limited to 'gold/fileread.cc')
-rw-r--r--gold/fileread.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/gold/fileread.cc b/gold/fileread.cc
index c5dc320..3fd35af 100644
--- a/gold/fileread.cc
+++ b/gold/fileread.cc
@@ -856,6 +856,16 @@ File_view::~File_view()
// Class Input_file.
+// Create a file given just the filename.
+
+Input_file::Input_file(const char* name)
+ : found_name_(), file_(), is_in_sysroot_(false), format_(FORMAT_NONE)
+{
+ this->input_argument_ =
+ new Input_file_argument(name, Input_file_argument::INPUT_FILE_TYPE_FILE,
+ "", false, Position_dependent_options());
+}
+
// Create a file for testing.
Input_file::Input_file(const Task* task, const char* name,