diff options
-rw-r--r-- | lib/Core/Executor.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index 184b0983..88ede5c8 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()"); } } |