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/ConstantProp.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/ConstantProp.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/ConstantProp.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/ConstantProp.cpp b/llvm/lib/Transforms/Scalar/ConstantProp.cpp index f1f7a442221..8be02476b9c 100644 --- a/llvm/lib/Transforms/Scalar/ConstantProp.cpp +++ b/llvm/lib/Transforms/Scalar/ConstantProp.cpp @@ -49,7 +49,10 @@ Pass *llvm::createConstantPropagationPass() { bool ConstantPropagation::runOnFunction(Function &F) { // Initialize the worklist to all of the instructions ready to process... - std::set<Instruction*> WorkList(inst_begin(F), inst_end(F)); + std::set<Instruction*> WorkList; + for(inst_iterator i = inst_begin(F), e = inst_end(F); i != e; ++i) { + WorkList.insert(&*i); + } bool Changed = false; while (!WorkList.empty()) { |