From 343f4e1a653da5ff10c86c4b62c378e268e32027 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 23 Feb 2017 15:54:20 +0100 Subject: CommandLine: do not copy list in optionIsSet Pass the list as reference. Otherwise we can get errors with newer LLVM like: lib/Basic/ConstructSolverChain.cpp:26:19: error: call to deleted constructor of 'llvm::cl::list' if (optionIsSet(queryLoggingOptions, SOLVER_KQUERY)) { ^~~~~~~~~~~~~~~~~~~ llvm/Support/CommandLine.h:1466:3: note: 'list' has been explicitly marked deleted here list(const list &) = delete; ^ Signed-off-by: Jiri Slaby --- include/klee/CommandLine.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/klee/CommandLine.h b/include/klee/CommandLine.h index 95aa51e0..cc186db7 100644 --- a/include/klee/CommandLine.h +++ b/include/klee/CommandLine.h @@ -70,8 +70,7 @@ extern llvm::cl::opt MetaSMTBackend; //A bit of ugliness so we can use cl::list<> like cl::bits<>, see queryLoggingOptions template -static bool optionIsSet(llvm::cl::list list, T option) -{ +static bool optionIsSet(llvm::cl::list &list, T option) { return std::find(list.begin(), list.end(), option) != list.end(); } -- cgit 1.4.1