diff --git a/src/llvm/util.cpp b/src/llvm/util.cpp index cf2940fc..7c2d7168 100644 --- a/src/llvm/util.cpp +++ b/src/llvm/util.cpp @@ -17,8 +17,8 @@ using namespace util; bool LLVMIRBuilderHelper::HasTerminator(llvm::BasicBlock* bb) { - for (auto it = bb->begin(); it != bb->end(); ++it) { - if (it->isTerminator()) { + for (auto& it : *bb) { + if (it.isTerminator()) { return true; } } diff --git a/src/llvm_ir_generator.cpp b/src/llvm_ir_generator.cpp index cb764fa2..c14b4a02 100644 --- a/src/llvm_ir_generator.cpp +++ b/src/llvm_ir_generator.cpp @@ -5,9 +5,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -20,11 +18,9 @@ #include #include -#include #include #include #include -#include #include #include #include