diff options
author | Dan Gohman <gohman@apple.com> | 2009-10-24 19:57:58 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-10-24 19:57:58 +0000 |
commit | 70b2bee8e7dda22d70475bf748385654559a0ef8 (patch) | |
tree | cfb3cb706c5e793ac111bfe0cd2d16a577733644 /include/llvm/Analysis/Dominators.h | |
parent | bfd5e3d7b1379c07c449e5022243d12bf3a6a627 (diff) | |
download | external_llvm-70b2bee8e7dda22d70475bf748385654559a0ef8.zip external_llvm-70b2bee8e7dda22d70475bf748385654559a0ef8.tar.gz external_llvm-70b2bee8e7dda22d70475bf748385654559a0ef8.tar.bz2 |
Make DominanceFrontier::addBasicBlock return the iterator for the newly
inserted block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/Dominators.h')
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 59ce6e7..17aaf95 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -905,9 +905,9 @@ public: iterator find(BasicBlock *B) { return Frontiers.find(B); } const_iterator find(BasicBlock *B) const { return Frontiers.find(B); } - void addBasicBlock(BasicBlock *BB, const DomSetType &frontier) { + iterator addBasicBlock(BasicBlock *BB, const DomSetType &frontier) { assert(find(BB) == end() && "Block already in DominanceFrontier!"); - Frontiers.insert(std::make_pair(BB, frontier)); + return Frontiers.insert(std::make_pair(BB, frontier)).first; } /// removeBlock - Remove basic block BB's frontier. |