diff options
author | Gereon Kremer <nafur42@gmail.com> | 2021-06-08 09:05:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-08 07:05:35 +0000 |
commit | 57b632c70aa01c95216fd5f43338cf2d76374b4e (patch) | |
tree | abd72da32f5d59fb700ee861f011be3fb5b985fc /src/main/driver_unified.cpp | |
parent | d265cc611581c1d5da16283008d4fcb95eab74dd (diff) |
Remove `binary_name` option (#6693)
The binary_name is solely used as a temporary storage to pass the data from the options parser back to the runCvc5 method where it is put in a static variable. This PR gets rid of the option and the public option getter in favor of directly storing the program name in the static variable using an additional argument to parseOptions().
Diffstat (limited to 'src/main/driver_unified.cpp')
-rw-r--r-- | src/main/driver_unified.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/driver_unified.cpp b/src/main/driver_unified.cpp index caa0340bd..697501d13 100644 --- a/src/main/driver_unified.cpp +++ b/src/main/driver_unified.cpp @@ -57,7 +57,7 @@ thread_local Options* pOptions; const char* progPath; /** Just the basename component of argv[0] */ -const std::string* progName; +std::string progName; /** A pointer to the CommandExecutor (the signal handlers need it) */ std::unique_ptr<cvc5::main::CommandExecutor> pExecutor; @@ -80,7 +80,7 @@ TotalTimer::~TotalTimer() void printUsage(Options& opts, bool full) { stringstream ss; - ss << "usage: " << options::getBinaryName(opts) << " [options] [input-file]" + ss << "usage: " << progName << " [options] [input-file]" << endl << endl << "Without an input file, or with `-', cvc5 reads from standard input." @@ -106,13 +106,11 @@ int runCvc5(int argc, char* argv[], Options& opts) progPath = argv[0]; // Parse the options - vector<string> filenames = Options::parseOptions(&opts, argc, argv); + std::vector<string> filenames = + Options::parseOptions(&opts, argc, argv, progName); auto limit = install_time_limit(opts); - string progNameStr = options::getBinaryName(opts); - progName = &progNameStr; - if (opts.driver.help) { printUsage(opts, true); |