Remove SILBasicBlock::getBBArgIndex(SILArgument *) in favor of SILArgument::getIndex().

The index is a property of the argument. There is no reason from a modeling
perspective to go through the BB to get it.

Swift SVN r21338
This commit is contained in:
Michael Gottesman
2014-08-21 04:06:19 +00:00
parent 7c9b29a214
commit 0f7053bd01
7 changed files with 9 additions and 19 deletions

View File

@@ -134,7 +134,7 @@ private:
if (auto *A = dyn_cast<SILArgument>(User)) {
auto *BB = A->getParent();
auto Index = BB->getBBArgIndex(A);
auto Index = A->getIndex();
for (auto *Pred : BB->getPreds()) {
auto *V = getArgForTerminator(Pred->getTerminator(), BB, Index);