diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-27 15:13:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-27 15:13:33 +0000 |
commit | 2d3a7a6ff07526222a76f0e8fb6b015c45f5200e (patch) | |
tree | 7ec456d4a69684c55e6ba5be7e0df6800f31bc51 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
parent | 8bcc86b6aeb1d3c66c65aa85224933428474929b (diff) | |
download | bcm5719-llvm-2d3a7a6ff07526222a76f0e8fb6b015c45f5200e.tar.gz bcm5719-llvm-2d3a7a6ff07526222a76f0e8fb6b015c45f5200e.zip |
Changes to fix up the inst_iterator to pass to boost iterator checks. This
patch was graciously contributed by Vladimir Prus.
llvm-svn: 13185
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index e2607c0c1a8..92b7f1a39bc 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -2934,7 +2934,10 @@ bool InstCombiner::runOnFunction(Function &F) { bool Changed = false; TD = &getAnalysis<TargetData>(); - WorkList.insert(WorkList.end(), inst_begin(F), inst_end(F)); + for (inst_iterator i = inst_begin(F), e = inst_end(F); i != e; ++i) { + WorkList.push_back(&*i); + } + while (!WorkList.empty()) { Instruction *I = WorkList.back(); // Get an instruction from the worklist |