diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2018-08-07 23:24:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-07 23:24:07 -0700 |
commit | 047e75b485ad16a729083c210ba4064943d2e7c5 (patch) | |
tree | cbd0ac11a061cb6da426e44bd6684f6115fecc88 /src/main | |
parent | 95e9918607ed879347bb250ecbaa3c5c557d71b4 (diff) |
Require Swig 3 (#2283)
Removes some hacks due to Swig 2's incomplete C++11 support and adds
checks for version 3 at configuration time as well as in swig.h
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/driver_unified.cpp | 3 | ||||
-rw-r--r-- | src/main/interactive_shell.cpp | 5 | ||||
-rw-r--r-- | src/main/main.h | 3 |
3 files changed, 4 insertions, 7 deletions
diff --git a/src/main/driver_unified.cpp b/src/main/driver_unified.cpp index 816b40daa..f97b037eb 100644 --- a/src/main/driver_unified.cpp +++ b/src/main/driver_unified.cpp @@ -26,7 +26,6 @@ // This must come before PORTFOLIO_BUILD. #include "cvc4autoconfig.h" -#include "base/tls.h" #include "base/configuration.h" #include "base/output.h" #include "expr/expr_iomanip.h" @@ -56,7 +55,7 @@ using namespace CVC4::main; namespace CVC4 { namespace main { /** Global options variable */ - CVC4_THREAD_LOCAL Options* pOptions; + thread_local Options* pOptions; /** Full argv[0] */ const char *progPath; diff --git a/src/main/interactive_shell.cpp b/src/main/interactive_shell.cpp index f1220b961..2cec42fbf 100644 --- a/src/main/interactive_shell.cpp +++ b/src/main/interactive_shell.cpp @@ -37,7 +37,6 @@ # endif /* HAVE_EXT_STDIO_FILEBUF_H */ #endif /* HAVE_LIBREADLINE */ -#include "base/tls.h" #include "base/output.h" #include "options/language.h" #include "options/options.h" @@ -384,8 +383,8 @@ struct StringPrefix2Less { };/* struct StringPrefix2Less */ char* commandGenerator(const char* text, int state) { - static CVC4_THREAD_LOCAL const std::string* rlCommand; - static CVC4_THREAD_LOCAL set<string>::const_iterator* rlDeclaration; + static thread_local const std::string* rlCommand; + static thread_local set<string>::const_iterator* rlDeclaration; const std::string* i = lower_bound(commandsBegin, commandsEnd, text, StringPrefix2Less()); const std::string* j = upper_bound(commandsBegin, commandsEnd, text, StringPrefix1Less()); diff --git a/src/main/main.h b/src/main/main.h index 57c00ffc0..ee5341b87 100644 --- a/src/main/main.h +++ b/src/main/main.h @@ -17,7 +17,6 @@ #include <exception> #include <string> -#include "base/tls.h" #include "base/exception.h" #include "cvc4autoconfig.h" #include "expr/expr_manager.h" @@ -54,7 +53,7 @@ extern CVC4::TimerStat* pTotalTime; extern bool segvSpin; /** A pointer to the options in play */ -extern CVC4_THREAD_LOCAL Options* pOptions; +extern thread_local Options* pOptions; /** Initialize the driver. Sets signal handlers for SIGINT and SIGSEGV. * This can throw a CVC4::Exception. |