about summary refs log tree commit diff homepage
path: root/lib/Module/InstructionInfoTable.cpp
diff options
context:
space:
mode:
authorAndrea Mattavelli <andreamattavelli@users.noreply.github.com>2017-07-18 17:39:21 +0100
committerGitHub <noreply@github.com>2017-07-18 17:39:21 +0100
commit5e4f0b7c79d57b9a9908f6293a5936fa54e511e9 (patch)
tree8429e4cb0c60bec43621c4971626fea397ea108f /lib/Module/InstructionInfoTable.cpp
parent64f367ea9db4739b70414cba002bf25d28db6242 (diff)
parentc9c90a0ecdce10172fd5318aea60a9ff4057679f (diff)
downloadklee-5e4f0b7c79d57b9a9908f6293a5936fa54e511e9.tar.gz
Merge pull request #672 from jirislaby/llvm40_static_casts
llvm: get rid of static_casts from iterators
Diffstat (limited to 'lib/Module/InstructionInfoTable.cpp')
-rw-r--r--lib/Module/InstructionInfoTable.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Module/InstructionInfoTable.cpp b/lib/Module/InstructionInfoTable.cpp
index 8f6c7c2b..3ba4895e 100644
--- a/lib/Module/InstructionInfoTable.cpp
+++ b/lib/Module/InstructionInfoTable.cpp
@@ -120,7 +120,7 @@ InstructionInfoTable::InstructionInfoTable(Module *m)
 
   for (Module::iterator fnIt = m->begin(), fn_ie = m->end(); 
        fnIt != fn_ie; ++fnIt) {
-    Function *fn = static_cast<Function *>(fnIt);
+    Function *fn = &*fnIt;
 
     // We want to ensure that as all instructions have source information, if
     // available. Clang sometimes will not write out debug information on the
@@ -193,6 +193,6 @@ InstructionInfoTable::getFunctionInfo(const Function *f) const {
     // and construct a test case for it if it does, though.
     return dummyInfo;
   } else {
-    return getInfo(static_cast<const Instruction *>(f->begin()->begin()));
+    return getInfo(&*(f->begin()->begin()));
   }
 }