Skip to content

Commit eb49a3f

Browse files
committed
get_language options to language API
Adds call to `get_language_options` to the language API. Prevents an uninitialized bool error in the Java front-end.
1 parent b5a205a commit eb49a3f

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/java_bytecode/java_bytecode_language.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Author: Daniel Kroening, [email protected]
1919
class java_bytecode_languaget:public languaget
2020
{
2121
public:
22-
virtual void get_language_options(const cmdlinet &);
22+
virtual void get_language_options(const cmdlinet &) override;
2323

2424
virtual bool preprocess(
2525
std::istream &instream,

src/langapi/language_ui.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ bool language_uit::parse(const std::string &filename)
121121

122122
languaget &language=*lf.language;
123123
language.set_message_handler(get_message_handler());
124+
language.get_language_options(_cmdline);
124125

125126
status() << "Parsing " << filename << eom;
126127

src/util/language.h

+4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ class symbol_tablet;
1919
class exprt;
2020
class namespacet;
2121
class typet;
22+
class cmdlinet;
2223

2324
class languaget:public messaget
2425
{
2526
public:
27+
// Parse language-specific options
28+
virtual void get_language_options(const cmdlinet &) {}
29+
2630
// parse file
2731

2832
virtual bool preprocess(

0 commit comments

Comments
 (0)