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
+4 -1
View File
@@ -76,7 +76,10 @@ namespace {
bool DCE::runOnFunction(Function &F) {
// Start out with all of the instructions in the worklist...
std::vector<Instruction*> WorkList(inst_begin(F), inst_end(F));
std::vector<Instruction*> WorkList;
for (inst_iterator i = inst_begin(F), e = inst_end(F); i != e; ++i) {
WorkList.push_back(&*i);
}
std::set<Instruction*> DeadInsts;
// Loop over the worklist finding instructions that are dead. If they are