Skip to content

Commit a93e43f

Browse files
author
martin
committed
Separate out goto_analyzer's register_languages as with other tools
1 parent 45f1e4e commit a93e43f

File tree

3 files changed

+33
-20
lines changed

3 files changed

+33
-20
lines changed

src/goto-analyzer/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
SRC = goto_analyzer_main.cpp \
1+
SRC = goto_analyzer_languages.cpp \
2+
goto_analyzer_main.cpp \
23
goto_analyzer_parse_options.cpp \
34
taint_analysis.cpp \
45
taint_parser.cpp \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*******************************************************************\
2+
3+
Module: Language Registration
4+
5+
Author: Martin Brain, [email protected]
6+
7+
\*******************************************************************/
8+
9+
/// \file
10+
/// Language Registration
11+
12+
#include "goto_analyzer_parse_options.h"
13+
14+
#include <langapi/mode.h>
15+
16+
#include <ansi-c/ansi_c_language.h>
17+
#include <cpp/cpp_language.h>
18+
19+
#ifdef HAVE_JSIL
20+
# include <jsil/jsil_language.h>
21+
#endif
22+
23+
void goto_analyzer_parse_optionst::register_languages()
24+
{
25+
register_language(new_ansi_c_language);
26+
register_language(new_cpp_language);
27+
28+
#ifdef HAVE_JSIL
29+
register_language(new_jsil_language);
30+
#endif
31+
}

src/goto-analyzer/goto_analyzer_parse_options.cpp

-19
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,12 @@ Author: Daniel Kroening, [email protected]
1616
#include <iostream>
1717
#include <memory>
1818

19-
#include <ansi-c/ansi_c_language.h>
2019
#include <ansi-c/cprover_library.h>
2120

2221
#include <assembler/remove_asm.h>
2322

24-
#include <cpp/cpp_language.h>
2523
#include <cpp/cprover_library.h>
2624

27-
#ifdef HAVE_JSIL
28-
# include <jsil/jsil_language.h>
29-
#endif
30-
3125
#include <goto-programs/add_malloc_may_fail_variable_initializations.h>
3226
#include <goto-programs/initialize_goto_model.h>
3327
#include <goto-programs/link_to_library.h>
@@ -39,9 +33,6 @@ Author: Daniel Kroening, [email protected]
3933
#include <analyses/ai.h>
4034
#include <analyses/local_may_alias.h>
4135

42-
#include <langapi/mode.h>
43-
#include <langapi/language.h>
44-
4536
#include <util/config.h>
4637
#include <util/exception_utils.h>
4738
#include <util/exit_codes.h>
@@ -67,16 +58,6 @@ goto_analyzer_parse_optionst::goto_analyzer_parse_optionst(
6758
{
6859
}
6960

70-
void goto_analyzer_parse_optionst::register_languages()
71-
{
72-
register_language(new_ansi_c_language);
73-
register_language(new_cpp_language);
74-
75-
#ifdef HAVE_JSIL
76-
register_language(new_jsil_language);
77-
#endif
78-
}
79-
8061
void goto_analyzer_parse_optionst::get_command_line_options(optionst &options)
8162
{
8263
if(config.set(cmdline))

0 commit comments

Comments
 (0)