From 3e28c11203af6c96d612e45fb45445e12d41ad7f Mon Sep 17 00:00:00 2001 From: Lukas Zaoral Date: Tue, 24 Aug 2021 13:59:29 +0200 Subject: llvm13: llvm::cl::GeneralCategory is no longer a global Therefore, llvm::cl::getGeneralCategory() should be used instead. See: https://reviews.llvm.org/D105959 --- tools/kleaver/main.cpp | 5 ++++- tools/klee/main.cpp | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/kleaver/main.cpp b/tools/kleaver/main.cpp index 9a79474c..0a4cfbff 100644 --- a/tools/kleaver/main.cpp +++ b/tools/kleaver/main.cpp @@ -387,8 +387,11 @@ static bool printInputAsSMTLIBv2(const char *Filename, } int main(int argc, char **argv) { - +#if LLVM_VERSION_CODE >= LLVM_VERSION(13, 0) + KCommandLine::HideOptions(llvm::cl::getGeneralCategory()); +#else KCommandLine::HideOptions(llvm::cl::GeneralCategory); +#endif bool success = true; diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp index 1ab809aa..f68e3b27 100644 --- a/tools/klee/main.cpp +++ b/tools/klee/main.cpp @@ -1158,7 +1158,11 @@ linkWithUclibc(StringRef libDir, std::string opt_suffix, int main(int argc, char **argv, char **envp) { atexit(llvm_shutdown); // Call llvm_shutdown() on exit. +#if LLVM_VERSION_CODE >= LLVM_VERSION(13, 0) + KCommandLine::HideOptions(llvm::cl::getGeneralCategory()); +#else KCommandLine::HideOptions(llvm::cl::GeneralCategory); +#endif llvm::InitializeNativeTarget(); -- cgit 1.4.1