Skip to content

Commit 59000e6

Browse files
committed
[NFC] Inline DependencyKey::createForProvidedEntityInterface
1 parent 6189e8e commit 59000e6

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

include/swift/AST/AbstractSourceFileDepGraphFactory.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,11 @@ class AbstractSourceFileDepGraphFactory {
7373
for (const auto &declOrPair : contentsVec) {
7474
auto fp =
7575
AbstractSourceFileDepGraphFactory::getFingerprintIfAny(declOrPair);
76-
addADefinedDecl(
77-
DependencyKey::createForProvidedEntityInterface<kind>(declOrPair),
78-
fp);
76+
auto key = DependencyKey::Builder{kind, DeclAspect::interface}
77+
.withContext(declOrPair)
78+
.withName(declOrPair)
79+
.build();
80+
addADefinedDecl(key, fp);
7981
}
8082
}
8183

include/swift/AST/FineGrainedDependencies.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -535,11 +535,6 @@ class DependencyKey {
535535
}
536536
bool isInterface() const { return getAspect() == DeclAspect::interface; }
537537

538-
/// Create just the interface half of the keys for a provided Decl or Decl
539-
/// pair
540-
template <NodeKind kind, typename Entity>
541-
static DependencyKey createForProvidedEntityInterface(Entity);
542-
543538
DependencyKey correspondingImplementation() const {
544539
return withAspect(DeclAspect::implementation);
545540
}

lib/AST/FrontendSourceFileDepGraphFactory.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,6 @@ static std::string mangleTypeAsContext(const NominalTypeDecl *NTD) {
6565
// MARK: DependencyKey::Builder
6666
//==============================================================================
6767

68-
template <NodeKind kindArg, typename Entity>
69-
DependencyKey DependencyKey::createForProvidedEntityInterface(Entity entity) {
70-
return DependencyKey::Builder{kindArg, DeclAspect::interface}
71-
.withContext(entity)
72-
.withName(entity)
73-
.build();
74-
}
75-
7668
DependencyKey DependencyKey::Builder::build() && {
7769
return DependencyKey{
7870
kind,

0 commit comments

Comments
 (0)