From bb618bae30712387ea53e8c5446f23dc2ca0156d Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Sun, 7 Nov 2021 17:02:18 -0800 Subject: [PATCH] remove -O add-C++ and -O update-C++ options --- src/Options.cc | 8 +------- src/script_opt/ScriptOpt.cc | 19 ------------------- src/script_opt/ScriptOpt.h | 12 ------------ 3 files changed, 1 insertion(+), 38 deletions(-) diff --git a/src/Options.cc b/src/Options.cc index 9bc235cbcc..5cba4fe246 100644 --- a/src/Options.cc +++ b/src/Options.cc @@ -202,8 +202,6 @@ static void print_analysis_help() fprintf(stderr, " report-uncompilable print names of functions that can't be compiled\n"); fprintf(stderr, " use-C++ use available C++ script bodies\n"); fprintf(stderr, "\n experimental options for incremental compilation:\n"); - fprintf(stderr, " add-C++ generate private C++ for any missing script bodies\n"); - fprintf(stderr, " update-C++ generate reusable C++ for any missing script bodies\n"); } static void set_analysis_option(const char* opt, Options& opts) @@ -223,9 +221,7 @@ static void set_analysis_option(const char* opt, Options& opts) exit(0); } - if ( util::streq(opt, "add-C++") ) - a_o.add_CPP = true; - else if ( util::streq(opt, "dump-uds") ) + if ( util::streq(opt, "dump-uds") ) a_o.activate = a_o.dump_uds = true; else if ( util::streq(opt, "dump-xform") ) a_o.activate = a_o.dump_xform = true; @@ -253,8 +249,6 @@ static void set_analysis_option(const char* opt, Options& opts) a_o.inliner = a_o.report_recursive = true; else if ( util::streq(opt, "report-uncompilable") ) a_o.report_uncompilable = true; - else if ( util::streq(opt, "update-C++") ) - a_o.update_CPP = true; else if ( util::streq(opt, "use-C++") ) a_o.use_CPP = true; else if ( util::streq(opt, "xform") ) diff --git a/src/script_opt/ScriptOpt.cc b/src/script_opt/ScriptOpt.cc index aa70a8ae9d..2940b1b5ec 100644 --- a/src/script_opt/ScriptOpt.cc +++ b/src/script_opt/ScriptOpt.cc @@ -221,8 +221,6 @@ static void init_options() check_env_opt("ZEEK_PROFILE", analysis_options.profile_ZAM); // Compile-to-C++-related options. - check_env_opt("ZEEK_ADD_CPP", analysis_options.add_CPP); - check_env_opt("ZEEK_UPDATE_CPP", analysis_options.update_CPP); check_env_opt("ZEEK_GEN_CPP", analysis_options.gen_CPP); check_env_opt("ZEEK_GEN_STANDALONE_CPP", analysis_options.gen_standalone_CPP); check_env_opt("ZEEK_COMPILE_ALL", analysis_options.compile_all); @@ -233,23 +231,6 @@ static void init_options() analysis_options.gen_CPP = true; if ( analysis_options.gen_CPP ) - { - if ( analysis_options.add_CPP ) - { - reporter->Warning("gen-C++ incompatible with add-C++"); - analysis_options.add_CPP = false; - } - - if ( analysis_options.update_CPP ) - { - reporter->Warning("gen-C++ incompatible with update-C++"); - analysis_options.update_CPP = false; - } - - generating_CPP = true; - } - - if ( analysis_options.update_CPP || analysis_options.add_CPP ) generating_CPP = true; if ( analysis_options.use_CPP && generating_CPP ) diff --git a/src/script_opt/ScriptOpt.h b/src/script_opt/ScriptOpt.h index 065a9bb2c9..8d15eadb23 100644 --- a/src/script_opt/ScriptOpt.h +++ b/src/script_opt/ScriptOpt.h @@ -96,18 +96,6 @@ struct AnalyOpt // of the corresponding script, and not activated by default). bool gen_standalone_CPP = false; - // If true, generate C++ for those script bodies that don't already - // have generated code, in a form that enables later compiles to - // take advantage of the newly-added elements. Only use for generating - // a zeek that will always include the associated scripts. - bool update_CPP = false; - - // If true, generate C++ for those script bodies that don't already - // have generated code. The added C++ is not made available for - // later generated code, and will work for a generated zeek that - // runs without including the associated scripts. - bool add_CPP = false; - // If true, use C++ bodies if available. bool use_CPP = false;