Add a new "DominatorSet::addDominator" method to allow updates

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3937 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-09-26 05:42:47 +00:00
parent 699b305c86
commit b51bf39b93

View File

@ -107,6 +107,15 @@ public:
assert(find(BB) == end() && "Block already in DominatorSet!");
Doms.insert(std::make_pair(BB, Dominators));
}
// addDominator - If a new block is inserted into the CFG, then method may be
// called to notify the blocks it dominates that it is in their set.
//
void addDominator(BasicBlock *BB, BasicBlock *NewDominator) {
iterator I = find(BB);
assert(I != end() && "BB is not in DominatorSet!");
I->second.insert(NewDominator);
}
};