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:
@@ -57,7 +57,7 @@ static void emitStoreToForeignErrorSlot(SILGenFunction &gen,
|
||||
|
||||
// If we have the slot, emit a store to it.
|
||||
gen.B.emitBlock(hasSlotBB);
|
||||
SILValue slot = hasSlotBB->createBBArg(errorPtrObjectTy);
|
||||
SILValue slot = hasSlotBB->createArgument(errorPtrObjectTy);
|
||||
emitStoreToForeignErrorSlot(gen, loc, slot, errorSrc);
|
||||
gen.B.createBranch(loc, contBB);
|
||||
|
||||
@@ -276,7 +276,7 @@ void SILGenFunction::emitForeignErrorBlock(SILLocation loc,
|
||||
// If we are not provided with an errorSlot value, then we are passed the
|
||||
// unwrapped optional error as the argument of the errorBB. This value is
|
||||
// passed at +1 meaning that we still need to create a cleanup for errorV.
|
||||
errorV = errorBB->getBBArg(0);
|
||||
errorV = errorBB->getArgument(0);
|
||||
}
|
||||
|
||||
ManagedValue error = emitManagedRValueWithCleanup(errorV);
|
||||
@@ -383,7 +383,7 @@ emitResultIsNilErrorCheck(SILGenFunction &gen, SILLocation loc,
|
||||
// In the continuation block, take ownership of the now non-optional
|
||||
// result value.
|
||||
gen.B.emitBlock(contBB);
|
||||
SILValue objectResult = contBB->createBBArg(resultObjectType);
|
||||
SILValue objectResult = contBB->createArgument(resultObjectType);
|
||||
return gen.emitManagedRValueWithCleanup(objectResult);
|
||||
}
|
||||
|
||||
@@ -401,7 +401,7 @@ emitErrorIsNonNilErrorCheck(SILGenFunction &gen, SILLocation loc,
|
||||
|
||||
// Switch on the optional error.
|
||||
SILBasicBlock *errorBB = gen.createBasicBlock(FunctionSection::Postmatter);
|
||||
errorBB->createBBArg(optionalError->getType().unwrapAnyOptionalType());
|
||||
errorBB->createArgument(optionalError->getType().unwrapAnyOptionalType());
|
||||
SILBasicBlock *contBB = gen.createBasicBlock();
|
||||
gen.B.createSwitchEnum(loc, optionalError, /*default*/ nullptr,
|
||||
{ { ctx.getOptionalSomeDecl(), errorBB },
|
||||
|
||||
Reference in New Issue
Block a user