aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Module
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2017-06-15 15:20:49 +0200
committerCristian Cadar <c.cadar@imperial.ac.uk>2018-05-24 14:08:27 +0100
commit9388395c21e512796b39baca81324ffb7b70de60 (patch)
tree1717fb5bbe172782130e52c0300fb45b26848100 /lib/Module
parent15d0d924d74f86457f9462a83c414067b6bfed2a (diff)
downloadklee-9388395c21e512796b39baca81324ffb7b70de60.tar.gz
llvm37: handle GetElementPtrInst::Create's new parameter
LLVM 3.7 added a PointeeType parameter to GetElementPtrInst::Create. Let's handle that by a macro called KLEE_LLVM_GEP_TYPE, defined in Version.h. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'lib/Module')
-rw-r--r--lib/Module/IntrinsicCleaner.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Module/IntrinsicCleaner.cpp b/lib/Module/IntrinsicCleaner.cpp
index 2ac9db62..3729ff82 100644
--- a/lib/Module/IntrinsicCleaner.cpp
+++ b/lib/Module/IntrinsicCleaner.cpp
@@ -86,12 +86,16 @@ bool IntrinsicCleanerPass::runOnBasicBlock(BasicBlock &b, Module &M) {
Value *val = new LoadInst(pSrc, std::string(), ii);
new StoreInst(val, pDst, ii);
Value *off = ConstantInt::get(Type::getInt64Ty(ctx), 1);
- pDst = GetElementPtrInst::Create(pDst, off, std::string(), ii);
- pSrc = GetElementPtrInst::Create(pSrc, off, std::string(), ii);
+ pDst = GetElementPtrInst::Create(KLEE_LLVM_GEP_TYPE(nullptr)
+ pDst, off, std::string(), ii);
+ pSrc = GetElementPtrInst::Create(KLEE_LLVM_GEP_TYPE(nullptr)
+ pSrc, off, std::string(), ii);
val = new LoadInst(pSrc, std::string(), ii);
new StoreInst(val, pDst, ii);
- pDst = GetElementPtrInst::Create(pDst, off, std::string(), ii);
- pSrc = GetElementPtrInst::Create(pSrc, off, std::string(), ii);
+ pDst = GetElementPtrInst::Create(KLEE_LLVM_GEP_TYPE(nullptr)
+ pDst, off, std::string(), ii);
+ pSrc = GetElementPtrInst::Create(KLEE_LLVM_GEP_TYPE(nullptr)
+ pSrc, off, std::string(), ii);
val = new LoadInst(pSrc, std::string(), ii);
new StoreInst(val, pDst, ii);
}