File tree 3 files changed +7
-0
lines changed
3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -542,6 +542,11 @@ bool compilet::write_bin_object_file(
542
542
const std::string &file_name,
543
543
const goto_modelt &src_goto_model)
544
544
{
545
+ status () << " Validating goto model" << eom;
546
+
547
+ if (validate_goto_model)
548
+ src_goto_model.validate (validation_modet::INVARIANT);
549
+
545
550
statistics () << " Writing binary format object `"
546
551
<< file_name << " '" << eom;
547
552
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ class compilet : public messaget
34
34
bool echo_file_name;
35
35
std::string working_directory;
36
36
std::string override_language;
37
+ bool validate_goto_model = false ;
37
38
38
39
enum { PREPROCESS_ONLY, // gcc -E
39
40
COMPILE_ONLY, // gcc -c
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ const char *goto_cc_options_without_argument[]=
49
49
" --big-endian" ,
50
50
" --no-arch" ,
51
51
" --partial-inlining" ,
52
+ " --validate-goto-model" ,
52
53
" -?" ,
53
54
nullptr
54
55
};
You can’t perform that action at this time.
0 commit comments