about summary refs log tree commit diff homepage
path: root/lib/Module/Checks.cpp
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2017-06-07 14:30:54 +0200
committerJiri Slaby <jirislaby@gmail.com>2017-06-15 14:42:45 +0200
commitc9c90a0ecdce10172fd5318aea60a9ff4057679f (patch)
tree9bb4b6d1ca326480776340312c5454ee78a2a1a5 /lib/Module/Checks.cpp
parent6204a1faed8f6ed15318be8da3e8e4b5e2f2a4ac (diff)
downloadklee-c9c90a0ecdce10172fd5318aea60a9ff4057679f.tar.gz
llvm: get rid of static_casts from iterators
In commit b7a6aec4eeb4 (convert iterators using static_cast), I switched
all implicit casts to static_cast. It turned out that llvm 4.0 banned
casting via static_cast. See e.g. 1e2bc42eb988 in the llvm repo what
they do.

So similarly to the above commit, change all the casts of iterators to
"&*" which is what they do in LLVM.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'lib/Module/Checks.cpp')
-rw-r--r--lib/Module/Checks.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Module/Checks.cpp b/lib/Module/Checks.cpp
index 48a4eb94..eb0f189b 100644
--- a/lib/Module/Checks.cpp
+++ b/lib/Module/Checks.cpp
@@ -71,7 +71,7 @@ bool DivCheckPass::runOnModule(Module &M) {
                                           Type::getInt64Ty(ctx),
                                           false,  /* sign doesn't matter */
                                           "int_cast_to_i64",
-                                          static_cast<Instruction *>(i));
+                                          &*i);
             
             // Lazily bind the function to avoid always importing it.
             if (!divZeroCheckFunction) {
@@ -129,7 +129,7 @@ bool OvershiftCheckPass::runOnModule(Module &M) {
                                           Type::getInt64Ty(ctx),
                                           false,  /* sign doesn't matter */
                                           "int_cast_to_i64",
-                                          static_cast<Instruction *>(i));
+                                          &*i);
             args.push_back(shift);