From f1ff53ecc29c50b4c493225fa11f6777aafa6858 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Fri, 9 Oct 2015 22:56:24 +0000 Subject: CodeGen: Remove implicit ilist iterator conversions, NFC Finish removing implicit ilist iterator conversions from LLVMCodeGen. I'm sure there are lots more of these in lib/CodeGen/*/. llvm-svn: 249915 --- llvm/lib/CodeGen/UnreachableBlockElim.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/CodeGen/UnreachableBlockElim.cpp') diff --git a/llvm/lib/CodeGen/UnreachableBlockElim.cpp b/llvm/lib/CodeGen/UnreachableBlockElim.cpp index d393e103104..8c9631e435b 100644 --- a/llvm/lib/CodeGen/UnreachableBlockElim.cpp +++ b/llvm/lib/CodeGen/UnreachableBlockElim.cpp @@ -71,8 +71,8 @@ bool UnreachableBlockElim::runOnFunction(Function &F) { // in them. std::vector DeadBlocks; for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) - if (!Reachable.count(I)) { - BasicBlock *BB = I; + if (!Reachable.count(&*I)) { + BasicBlock *BB = &*I; DeadBlocks.push_back(BB); while (PHINode *PN = dyn_cast(BB->begin())) { PN->replaceAllUsesWith(Constant::getNullValue(PN->getType())); @@ -131,7 +131,7 @@ bool UnreachableMachineBlockElim::runOnMachineFunction(MachineFunction &F) { // in them. std::vector DeadBlocks; for (MachineFunction::iterator I = F.begin(), E = F.end(); I != E; ++I) { - MachineBasicBlock *BB = I; + MachineBasicBlock *BB = &*I; // Test for deadness. if (!Reachable.count(BB)) { @@ -167,7 +167,7 @@ bool UnreachableMachineBlockElim::runOnMachineFunction(MachineFunction &F) { // Cleanup PHI nodes. for (MachineFunction::iterator I = F.begin(), E = F.end(); I != E; ++I) { - MachineBasicBlock *BB = I; + MachineBasicBlock *BB = &*I; // Prune unneeded PHI entries. SmallPtrSet preds(BB->pred_begin(), BB->pred_end()); -- cgit v1.2.3