mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[gardening] Drop BB from all argument related code in SILBasicBlock.
Before this commit all code relating to handling arguments in SILBasicBlock had somewhere in the name BB. This is redundant given that the class's name is already SILBasicBlock. This commit drops those names. Some examples: getBBArg() => getArgument() BBArgList => ArgumentList bbarg_begin() => args_begin()
This commit is contained in:
@@ -1968,7 +1968,7 @@ JumpDest PatternMatchEmission::getSharedCaseBlockDest(CaseStmt *caseBlock,
|
||||
pattern->forEachVariable([&](VarDecl *V) {
|
||||
if (!V->hasName())
|
||||
return;
|
||||
block->createBBArg(SGF.VarLocs[V].value->getType(), V);
|
||||
block->createArgument(SGF.VarLocs[V].value->getType(), V);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -2024,7 +2024,7 @@ void PatternMatchEmission::emitSharedCaseBlocks() {
|
||||
return;
|
||||
if (V->isLet()) {
|
||||
// Just emit a let with cleanup.
|
||||
SGF.VarLocs[V].value = caseBB->getBBArg(argIndex++);
|
||||
SGF.VarLocs[V].value = caseBB->getArgument(argIndex++);
|
||||
SGF.emitInitializationForVarDecl(V)->finishInitialization(SGF);
|
||||
} else {
|
||||
// The pattern variables were all emitted as lets and one got passed in,
|
||||
@@ -2032,7 +2032,8 @@ void PatternMatchEmission::emitSharedCaseBlocks() {
|
||||
SGF.VarLocs.erase(V);
|
||||
auto newVar = SGF.emitInitializationForVarDecl(V);
|
||||
auto loc = SGF.CurrentSILLoc;
|
||||
auto value = ManagedValue::forUnmanaged(caseBB->getBBArg(argIndex++));
|
||||
auto value =
|
||||
ManagedValue::forUnmanaged(caseBB->getArgument(argIndex++));
|
||||
auto formalType = V->getType()->getCanonicalType();
|
||||
RValue(SGF, loc, formalType, value).forwardInto(SGF, loc, newVar.get());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user