From c9c90a0ecdce10172fd5318aea60a9ff4057679f Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Wed, 7 Jun 2017 14:30:54 +0200 Subject: 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 --- lib/Module/RaiseAsm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Module/RaiseAsm.cpp') diff --git a/lib/Module/RaiseAsm.cpp b/lib/Module/RaiseAsm.cpp index 5fc54ef1..113dcc62 100644 --- a/lib/Module/RaiseAsm.cpp +++ b/lib/Module/RaiseAsm.cpp @@ -124,7 +124,7 @@ bool RaiseAsmPass::runOnModule(Module &M) { for (Module::iterator fi = M.begin(), fe = M.end(); fi != fe; ++fi) { for (Function::iterator bi = fi->begin(), be = fi->end(); bi != be; ++bi) { for (BasicBlock::iterator ii = bi->begin(), ie = bi->end(); ii != ie;) { - Instruction *i = static_cast(ii); + Instruction *i = &*ii; ++ii; changed |= runOnInstruction(M, i); } -- cgit 1.4.1