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
This commit is contained in:
Chris Lattner
2004-04-27 15:13:33 +00:00
parent 21e232501a
commit 6ffe551f65
14 changed files with 65 additions and 53 deletions

View File

@@ -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()) {