Skip to content

Commit c6cc675

Browse files
committed
Nits
1 parent a824ad6 commit c6cc675

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/swift/AST/ASTContext.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1124,13 +1124,13 @@ class ASTContext final {
11241124
AbstractFunctionDecl *originalAFD, unsigned previousGeneration,
11251125
llvm::SetVector<AutoDiffConfig> &results);
11261126

1127-
/// Given `Optional<T>.TangentVector` type, retreive the
1127+
/// Given `Optional<T>.TangentVector` type, retrieve the
11281128
/// `Optional<T>.TangentVector.init` declaration.
11291129
ConstructorDecl *getOptionalTanInitDecl(CanType optionalTanType);
11301130

11311131
/// Optional<T>.TangentVector is a struct with a single
11321132
/// Optional<T.TangentVector> `value` property. This is an implementation
1133-
/// detail of OptionalDifferentiation.swift. Retreive `VarDecl` corresponding
1133+
/// detail of OptionalDifferentiation.swift. Retrieve `VarDecl` corresponding
11341134
/// to this property.
11351135
VarDecl *getOptionalTanValueDecl(CanType optionalTanType);
11361136

lib/SILGen/SILGenPoly.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ ManagedValue SILGenFunction::emitTangentVectorToOptionalTangentVector(
322322
args.add(loc, RValue(*this, {optVal}, optionalOfWrappedTanType));
323323

324324
auto result = emitApplyAllocatingInitializer(loc, initDecl, std::move(args),
325-
Type(), SGFContext());
325+
Type(), ctxt);
326326
return std::move(result).getScalarValue();
327327
}
328328

@@ -353,7 +353,7 @@ ManagedValue SILGenFunction::emitOptionalTangentVectorToTangentVector(
353353

354354
return emitCheckedGetOptionalValueFrom(
355355
loc, std::move(wrappedVal).getScalarValue(),
356-
/*isImplicitUnwrap*/ true, getTypeLowering(wrappedType), ctxt);
356+
/*isImplicitUnwrap*/ true, getTypeLowering(optionalOfWrappedTanType), ctxt);
357357
}
358358

359359
/// Apply this transformation to an arbitrary value.

0 commit comments

Comments
 (0)