Skip to content
Snippets Groups Projects
Commit bad4db8b authored by Max Kazantsev's avatar Max Kazantsev
Browse files

[NFC] Replace readonly SmallVectorImpl with ArrayRef

llvm-svn: 353273
parent 4c3ba384
No related branches found
No related tags found
No related merge requests found
...@@ -46,7 +46,7 @@ void DeleteDeadBlock(BasicBlock *BB, DomTreeUpdater *DTU = nullptr); ...@@ -46,7 +46,7 @@ void DeleteDeadBlock(BasicBlock *BB, DomTreeUpdater *DTU = nullptr);
/// no predecessors that are not being deleted themselves. \p BBs must have no /// no predecessors that are not being deleted themselves. \p BBs must have no
/// duplicating blocks. If there are loops among this set of blocks, all /// duplicating blocks. If there are loops among this set of blocks, all
/// relevant loop info updates should be done before this function is called. /// relevant loop info updates should be done before this function is called.
void DeleteDeadBlocks(SmallVectorImpl <BasicBlock *> &BBs, void DeleteDeadBlocks(ArrayRef <BasicBlock *> BBs,
DomTreeUpdater *DTU = nullptr); DomTreeUpdater *DTU = nullptr);
/// We know that BB has one predecessor. If there are any single-entry PHI nodes /// We know that BB has one predecessor. If there are any single-entry PHI nodes
......
...@@ -48,11 +48,10 @@ ...@@ -48,11 +48,10 @@
using namespace llvm; using namespace llvm;
void llvm::DeleteDeadBlock(BasicBlock *BB, DomTreeUpdater *DTU) { void llvm::DeleteDeadBlock(BasicBlock *BB, DomTreeUpdater *DTU) {
SmallVector<BasicBlock *, 1> BBs = {BB}; DeleteDeadBlocks({BB}, DTU);
DeleteDeadBlocks(BBs, DTU);
} }
void llvm::DeleteDeadBlocks(SmallVectorImpl <BasicBlock *> &BBs, void llvm::DeleteDeadBlocks(ArrayRef <BasicBlock *> BBs,
DomTreeUpdater *DTU) { DomTreeUpdater *DTU) {
#ifndef NDEBUG #ifndef NDEBUG
// Make sure that all predecessors of each dead block is also dead. // Make sure that all predecessors of each dead block is also dead.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment