about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-04-05 02:52:03 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-04-05 02:52:03 +0000
commit252de191e9657f29be2f52c6b85d12f522052b7a (patch)
treec15083d63a74d06c6867a0260ac29c656ae61e6d
parentc70345caa213288aa748070f7a03c84fbdf89b5c (diff)
downloadklee-252de191e9657f29be2f52c6b85d12f522052b7a.tar.gz
Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@100383 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Module/ModuleUtil.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
index adfc5cfd..83a8aafa 100644
--- a/lib/Module/ModuleUtil.cpp
+++ b/lib/Module/ModuleUtil.cpp
@@ -64,8 +64,13 @@ Function *klee::getDirectCallTarget(const Instruction *i) {
 }
 
 static bool valueIsOnlyCalled(const Value *v) {
+#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 8)
   for (Value::use_const_iterator it = v->use_begin(), ie = v->use_end();
        it != ie; ++it) {
+#else
+  for (Value::const_use_iterator it = v->use_begin(), ie = v->use_end();
+       it != ie; ++it) {
+#endif
     if (const Instruction *instr = dyn_cast<Instruction>(*it)) {
       if (instr->getOpcode()==0) continue; // XXX function numbering inst
       if (!isa<CallInst>(instr) && !isa<InvokeInst>(instr)) return false;