diff options
-rw-r--r-- | .gitignore | 16 | ||||
-rw-r--r-- | lib/Core/Executor.cpp | 11 |
2 files changed, 26 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..f421d69f --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +Release/ +Release+Asserts/ +Debug/ +Debug+Asserts/ + +cscope.* + +*.log +*.sum +*.out +*.status + +*.config +*.cfg + +config.h diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index ba9db804..069022a2 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -929,8 +929,17 @@ ref<klee::ConstantExpr> Executor::evalConstant(const Constant *c) { } ref<Expr> res = ConcatExpr::createN(kids.size(), kids.data()); return cast<ConstantExpr>(res); + } else if (const ConstantArray *ca = dyn_cast<ConstantArray>(c)){ + llvm::SmallVector<ref<Expr>, 4> kids; + for (unsigned i = ca->getNumOperands(); i != 0; --i) { + unsigned op = i-1; + ref<Expr> kid = evalConstant(ca->getOperand(op)); + kids.push_back(kid); + } + ref<Expr> res = ConcatExpr::createN(kids.size(), kids.data()); + return cast<ConstantExpr>(res); } else { - // Constant{Array,Vector} + // Constant{Vector} assert(0 && "invalid argument to evalConstant()"); } } |