Add helper functions to SILBlock and SILFunction.

Swift SVN r18858
This commit is contained in:
Nadav Rotem
2014-06-13 06:10:07 +00:00
parent 9c00e8a55a
commit 1b650dcdf6
4 changed files with 12 additions and 0 deletions

View File

@@ -94,6 +94,10 @@ size_t SILBasicBlock::getBBArgIndex(SILArgument *Target) {
llvm_unreachable("Expected to find argument in block's argument list!");
}
SILArgument *SILBasicBlock::createArgument(SILType Ty) {
return new (getModule()) SILArgument(Ty, this);
}
/// \brief Splits a basic block into two at the specified instruction.
///
/// Note that all the instructions BEFORE the specified iterator