File tree Expand file tree Collapse file tree 6 files changed +23
-18
lines changed Expand file tree Collapse file tree 6 files changed +23
-18
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,11 @@ Author: Michael Tautschnig
11
11
12
12
#include " as86_cmdline.h"
13
13
14
- #include < iostream>
15
-
14
+ #include < util/invariant.h>
16
15
#include < util/prefix.h>
17
16
17
+ #include < iostream>
18
+
18
19
// non-as86 options
19
20
const char *goto_as86_options_with_argument[]=
20
21
{
@@ -56,7 +57,7 @@ const char *as86_options_with_argument[]=
56
57
57
58
bool as86_cmdlinet::parse (int argc, const char **argv)
58
59
{
59
- assert (argc> 0 );
60
+ PRECONDITION (argc > 0 );
60
61
add_arg (argv[0 ]);
61
62
62
63
for (int i=1 ; i<argc; i++)
Original file line number Diff line number Diff line change @@ -11,10 +11,11 @@ Author: Michael Tautschnig
11
11
12
12
#include " as_cmdline.h"
13
13
14
- #include < iostream>
15
-
14
+ #include < util/invariant.h>
16
15
#include < util/prefix.h>
17
16
17
+ #include < iostream>
18
+
18
19
// non-as options
19
20
const char *goto_as_options_with_argument[]=
20
21
{
@@ -78,7 +79,7 @@ const char *as_options_with_argument[]=
78
79
79
80
bool as_cmdlinet::parse (int argc, const char **argv)
80
81
{
81
- assert (argc> 0 );
82
+ PRECONDITION (argc > 0 );
82
83
add_arg (argv[0 ]);
83
84
84
85
for (int i=1 ; i<argc; i++)
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ int as_modet::doit()
201
201
{
202
202
if (outputs>0 )
203
203
{
204
- assert (!dest.empty ());
204
+ PRECONDITION (!dest.empty ());
205
205
compiler.add_input_file (dest);
206
206
os.close ();
207
207
}
@@ -230,7 +230,7 @@ int as_modet::doit()
230
230
231
231
if (outputs>0 )
232
232
{
233
- assert (!dest.empty ());
233
+ PRECONDITION (!dest.empty ());
234
234
compiler.add_input_file (dest);
235
235
}
236
236
else
@@ -260,7 +260,7 @@ int as_modet::doit()
260
260
// / run as or as86 with original command line
261
261
int as_modet::run_as ()
262
262
{
263
- assert (!cmdline.parsed_argv .empty ());
263
+ PRECONDITION (!cmdline.parsed_argv .empty ());
264
264
265
265
// build new argv
266
266
std::vector<std::string> new_argv;
Original file line number Diff line number Diff line change @@ -11,10 +11,11 @@ Author: Michael Tautschnig
11
11
12
12
#include " bcc_cmdline.h"
13
13
14
- #include < iostream>
15
-
14
+ #include < util/invariant.h>
16
15
#include < util/prefix.h>
17
16
17
+ #include < iostream>
18
+
18
19
// non-bcc options
19
20
const char *goto_bcc_options_with_argument[]=
20
21
{
@@ -68,7 +69,7 @@ const char *bcc_options_with_argument[]=
68
69
69
70
bool bcc_cmdlinet::parse (int argc, const char **argv)
70
71
{
71
- assert (argc> 0 );
72
+ PRECONDITION (argc > 0 );
72
73
add_arg (argv[0 ]);
73
74
74
75
for (int i=1 ; i<argc; i++)
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Author: CM Wintersteiger, 2006
11
11
12
12
#include " gcc_cmdline.h"
13
13
14
+ #include < util/invariant.h>
14
15
#include < util/prefix.h>
15
16
16
17
#include < cstring>
@@ -228,7 +229,7 @@ const char *gcc_options_without_argument[]=
228
229
// / \return none
229
230
bool gcc_cmdlinet::parse (int argc, const char **argv)
230
231
{
231
- assert (argc> 0 );
232
+ PRECONDITION (argc > 0 );
232
233
add_arg (argv[0 ]);
233
234
234
235
argst current_args;
@@ -447,8 +448,8 @@ bool gcc_cmdlinet::parse_arguments(
447
448
void gcc_cmdlinet::parse_specs_line (const std::string &line, bool in_spec_file)
448
449
{
449
450
// initial whitespace has been stripped
450
- assert (!line.empty ());
451
- assert (line[0 ]!= ' ' && line[0 ]!= ' \t ' );
451
+ PRECONDITION (!line.empty ());
452
+ PRECONDITION (line[0 ] != ' ' && line[0 ] != ' \t ' );
452
453
453
454
argst args_from_specs;
454
455
Original file line number Diff line number Diff line change @@ -11,10 +11,11 @@ Author: Daniel Kroening, 2013
11
11
12
12
#include " ld_cmdline.h"
13
13
14
- #include < iostream>
15
-
14
+ #include < util/invariant.h>
16
15
#include < util/prefix.h>
17
16
17
+ #include < iostream>
18
+
18
19
// clang-format off
19
20
const char *goto_ld_options_with_argument[]=
20
21
{
@@ -253,7 +254,7 @@ const char *ld_options_without_argument[]=
253
254
// / \return none
254
255
bool ld_cmdlinet::parse (int argc, const char **argv)
255
256
{
256
- assert (argc> 0 );
257
+ PRECONDITION (argc > 0 );
257
258
add_arg (argv[0 ]);
258
259
259
260
for (int i=1 ; i<argc; i++)
You can’t perform that action at this time.
0 commit comments