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 | 6ffe551f657c948d6a473a198ecbd1188bf9ce45 (patch) | |
tree | 7502db02d88eff125fc9e8c36d140faea8484787 /lib/Transforms/Scalar/ConstantProp.cpp | |
parent | 21e232501a9d5ace29187b20a211ca73b09a1c75 (diff) |
Changes to fix up the inst_iterator to pass to boost iterator checks. This
patch was graciously contributed by Vladimir Prus.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/ConstantProp.cpp')
-rw-r--r-- | lib/Transforms/Scalar/ConstantProp.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/ConstantProp.cpp b/lib/Transforms/Scalar/ConstantProp.cpp index f1f7a44222..8be02476b9 100644 --- a/lib/Transforms/Scalar/ConstantProp.cpp +++ b/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()) { |