File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
regression/goto-gcc/at_files Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1+ -o
2+ test.gb
13other.c
Original file line number Diff line number Diff line change @@ -12,8 +12,9 @@ Author: CM Wintersteiger, 2006
1212#include " gcc_cmdline.h"
1313
1414#include < cstring>
15- #include < iostream>
1615#include < fstream>
16+ #include < iostream>
17+ #include < sstream>
1718
1819#include < util/prefix.h>
1920
@@ -256,16 +257,18 @@ bool gcc_cmdlinet::parse_arguments(
256257 if (has_prefix (argv_i, " @" ))
257258 {
258259 std::ifstream opts_file (argv_i.substr (1 ));
260+ std::ostringstream all_lines;
259261 std::string line;
260262
261263 while (std::getline (opts_file, line))
262- {
263- // erase leading whitespace
264- line.erase (0 , line.find_first_not_of (" \t " ));
264+ all_lines << ' ' << line;
265265
266- if (!line.empty ())
267- parse_specs_line (line, false );
268- }
266+ line = all_lines.str ();
267+ // erase leading whitespace
268+ line.erase (0 , line.find_first_not_of (" \t " ));
269+
270+ if (!line.empty ())
271+ parse_specs_line (line, false );
269272
270273 continue ;
271274 }
You can’t perform that action at this time.
0 commit comments