diff options
author | Frank Busse <bb0xfb@gmail.com> | 2017-10-13 15:26:05 +0100 |
---|---|---|
committer | MartinNowack <martin.nowack@gmail.com> | 2018-05-01 15:34:38 +0200 |
commit | 76e4240f6e17ab1f17200c603cf827b2bb28458d (patch) | |
tree | 118bc50bf6ecbfe1c275411829095e9faaaf4c1a /lib/Core/ExecutorUtil.cpp | |
parent | 3d00adf56f866a802c857682b382d11972a727a1 (diff) | |
download | klee-76e4240f6e17ab1f17200c603cf827b2bb28458d.tar.gz |
add blockaddress and indirectbr instructions
Diffstat (limited to 'lib/Core/ExecutorUtil.cpp')
-rw-r--r-- | lib/Core/ExecutorUtil.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Core/ExecutorUtil.cpp b/lib/Core/ExecutorUtil.cpp index 62d65c31..a0f4de3d 100644 --- a/lib/Core/ExecutorUtil.cpp +++ b/lib/Core/ExecutorUtil.cpp @@ -119,6 +119,11 @@ namespace klee { assert(isa<ConstantExpr>(res) && "result of constant vector built is not a constant"); return cast<ConstantExpr>(res); + } else if (const BlockAddress * ba = dyn_cast<BlockAddress>(c)) { + // return the address of the specified basic block in the specified function + const auto arg_bb = (BasicBlock *) ba->getOperand(1); + const auto res = Expr::createPointer((uint64_t) (unsigned long) (void *) arg_bb); + return cast<ConstantExpr>(res); } else { std::string msg("Cannot handle constant "); llvm::raw_string_ostream os(msg); |