Skip to content

Commit

Permalink
Merge pull request swiftlang#33775 from slavapestov/auto-diff-interfa…
Browse files Browse the repository at this point in the history
…ce-type-cleanup

AutoDiff: Remove some unnecessary calls to getInterfaceType()
  • Loading branch information
slavapestov authored Sep 3, 2020
2 parents 9bd3ed3 + 5dd962c commit 789659e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/SILOptimizer/Differentiation/LinearMapInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ LinearMapInfo::createBranchingTraceDecl(SILBasicBlock *originalBB,
if (genericSig)
branchingTraceDecl->setGenericSignature(genericSig);
computeAccessLevel(branchingTraceDecl, original->getEffectiveSymbolLinkage());
branchingTraceDecl->getInterfaceType();
assert(branchingTraceDecl->hasInterfaceType());
file.addTopLevelDecl(branchingTraceDecl);
// Add basic block enum cases.
for (auto *predBB : originalBB->getPredecessorBlocks()) {
Expand All @@ -165,7 +163,6 @@ LinearMapInfo::createBranchingTraceDecl(SILBasicBlock *originalBB,
/*IdentifierLoc*/ loc, DeclName(astCtx.getIdentifier(bbId)), paramList,
loc, /*RawValueExpr*/ nullptr, branchingTraceDecl);
enumEltDecl->setImplicit();
enumEltDecl->getInterfaceType();
auto *enumCaseDecl = EnumCaseDecl::create(
/*CaseLoc*/ loc, {enumEltDecl}, branchingTraceDecl);
enumCaseDecl->setImplicit();
Expand Down Expand Up @@ -207,8 +204,6 @@ LinearMapInfo::createLinearMapStruct(SILBasicBlock *originalBB,
if (genericSig)
linearMapStruct->setGenericSignature(genericSig);
computeAccessLevel(linearMapStruct, original->getEffectiveSymbolLinkage());
linearMapStruct->getInterfaceType();
assert(linearMapStruct->hasInterfaceType());
file.addTopLevelDecl(linearMapStruct);
return linearMapStruct;
}
Expand Down

0 comments on commit 789659e

Please sign in to comment.