From 042939e77e1949ca5245f527b31d8052d60bb42e Mon Sep 17 00:00:00 2001 From: Luciano Almeida Date: Sat, 30 May 2020 12:27:54 -0300 Subject: [PATCH 1/6] [ConstraintSystem] Move some property wrappers implementation form header to cpp file --- lib/Sema/ConstraintSystem.cpp | 53 +++++++++++++++++++++++++++++++++++ lib/Sema/ConstraintSystem.h | 50 ++------------------------------- 2 files changed, 56 insertions(+), 47 deletions(-) diff --git a/lib/Sema/ConstraintSystem.cpp b/lib/Sema/ConstraintSystem.cpp index 536b682c38798..deab8571db37b 100644 --- a/lib/Sema/ConstraintSystem.cpp +++ b/lib/Sema/ConstraintSystem.cpp @@ -928,6 +928,59 @@ TypeVariableType *ConstraintSystem::isRepresentativeFor( return *member; } +Optional> +ConstraintSystem::getStorageWrapperInformation(SelectedOverload resolvedOverload) { + if (resolvedOverload.choice.isDecl()) { + if (auto *decl = dyn_cast(resolvedOverload.choice.getDecl())) { + if (decl->hasAttachedPropertyWrapper()) { + if (auto storageWrapper = decl->getPropertyWrapperStorageWrapper()) { + Type type = storageWrapper->getInterfaceType(); + if (Type baseType = resolvedOverload.choice.getBaseType()) { + type = baseType->getTypeOfMember(DC->getParentModule(), + storageWrapper, type); + } + return std::make_pair(decl, type); + } + } + } + } + return None; +} + +Optional> +ConstraintSystem::getPropertyWrapperInformation(SelectedOverload resolvedOverload) { + if (resolvedOverload.choice.isDecl()) { + if (auto *decl = dyn_cast(resolvedOverload.choice.getDecl())) { + if (decl->hasAttachedPropertyWrapper()) { + auto wrapperTy = decl->getPropertyWrapperBackingPropertyType(); + if (Type baseType = resolvedOverload.choice.getBaseType()) { + wrapperTy = baseType->getTypeOfMember(DC->getParentModule(), + decl, wrapperTy); + } + return std::make_pair(decl, wrapperTy); + } + } + } + return None; +} + +Optional> +ConstraintSystem::getWrappedPropertyInformation(SelectedOverload resolvedOverload) { + if (resolvedOverload.choice.isDecl()) { + if (auto *decl = dyn_cast(resolvedOverload.choice.getDecl())) { + if (auto wrapped = decl->getOriginalWrappedProperty()) { + Type type = wrapped->getInterfaceType(); + if (Type baseType = resolvedOverload.choice.getBaseType()) { + type = baseType->getTypeOfMember(DC->getParentModule(), + wrapped, type); + } + return std::make_pair(decl, type); + } + } + } + return None; +} + /// Does a var or subscript produce an l-value? /// /// \param baseType - the type of the base on which this object diff --git a/lib/Sema/ConstraintSystem.h b/lib/Sema/ConstraintSystem.h index 28b68e4779354..c74685f997e42 100644 --- a/lib/Sema/ConstraintSystem.h +++ b/lib/Sema/ConstraintSystem.h @@ -3080,62 +3080,18 @@ class ConstraintSystem { /// Gets the VarDecl associateed with resolvedOverload, and the type of the /// storage wrapper if the decl has an associated storage wrapper. Optional> - getStorageWrapperInformation(SelectedOverload resolvedOverload) { - if (resolvedOverload.choice.isDecl()) { - if (auto *decl = dyn_cast(resolvedOverload.choice.getDecl())) { - if (decl->hasAttachedPropertyWrapper()) { - if (auto storageWrapper = decl->getPropertyWrapperStorageWrapper()) { - Type type = storageWrapper->getInterfaceType(); - if (Type baseType = resolvedOverload.choice.getBaseType()) { - type = baseType->getTypeOfMember(DC->getParentModule(), - storageWrapper, type); - } - return std::make_pair(decl, type); - } - } - } - } - return None; - } + getStorageWrapperInformation(SelectedOverload resolvedOverload); /// Gets the VarDecl associateed with resolvedOverload, and the type of the /// backing storage if the decl has an associated property wrapper. Optional> - getPropertyWrapperInformation(SelectedOverload resolvedOverload) { - if (resolvedOverload.choice.isDecl()) { - if (auto *decl = dyn_cast(resolvedOverload.choice.getDecl())) { - if (decl->hasAttachedPropertyWrapper()) { - auto wrapperTy = decl->getPropertyWrapperBackingPropertyType(); - if (Type baseType = resolvedOverload.choice.getBaseType()) { - wrapperTy = baseType->getTypeOfMember(DC->getParentModule(), - decl, wrapperTy); - } - return std::make_pair(decl, wrapperTy); - } - } - } - return None; - } + getPropertyWrapperInformation(SelectedOverload resolvedOverload); /// Gets the VarDecl, and the type of the type property that it wraps if /// resolved overload has a decl which is the backing storage for a /// property wrapper. Optional> - getWrappedPropertyInformation(SelectedOverload resolvedOverload) { - if (resolvedOverload.choice.isDecl()) { - if (auto *decl = dyn_cast(resolvedOverload.choice.getDecl())) { - if (auto wrapped = decl->getOriginalWrappedProperty()) { - Type type = wrapped->getInterfaceType(); - if (Type baseType = resolvedOverload.choice.getBaseType()) { - type = baseType->getTypeOfMember(DC->getParentModule(), - wrapped, type); - } - return std::make_pair(decl, type); - } - } - } - return None; - } + getWrappedPropertyInformation(SelectedOverload resolvedOverload); /// Merge the equivalence sets of the two type variables. /// From a331ba0780c4b5f027de5d5076856ada6a17a3d5 Mon Sep 17 00:00:00 2001 From: Luciano Almeida Date: Sat, 30 May 2020 12:31:53 -0300 Subject: [PATCH 2/6] [ConstraintSystem] Abstract common logic for various get property wrappers get information --- lib/Sema/ConstraintSystem.cpp | 97 ++++++++++++++++++++++------------- 1 file changed, 60 insertions(+), 37 deletions(-) diff --git a/lib/Sema/ConstraintSystem.cpp b/lib/Sema/ConstraintSystem.cpp index deab8571db37b..854dcf019638d 100644 --- a/lib/Sema/ConstraintSystem.cpp +++ b/lib/Sema/ConstraintSystem.cpp @@ -928,59 +928,82 @@ TypeVariableType *ConstraintSystem::isRepresentativeFor( return *member; } -Optional> -ConstraintSystem::getStorageWrapperInformation(SelectedOverload resolvedOverload) { +static Optional> +getPropertyWrappersInformationFromOverload( + SelectedOverload resolvedOverload, DeclContext *DC, + llvm::function_ref>(VarDecl *)> + getInformation) { if (resolvedOverload.choice.isDecl()) { if (auto *decl = dyn_cast(resolvedOverload.choice.getDecl())) { - if (decl->hasAttachedPropertyWrapper()) { - if (auto storageWrapper = decl->getPropertyWrapperStorageWrapper()) { - Type type = storageWrapper->getInterfaceType(); - if (Type baseType = resolvedOverload.choice.getBaseType()) { - type = baseType->getTypeOfMember(DC->getParentModule(), - storageWrapper, type); - } - return std::make_pair(decl, type); + if (auto declInformation = getInformation(decl)) { + Type type; + VarDecl *memberDecl; + std::tie(memberDecl, type) = *declInformation; + if (Type baseType = resolvedOverload.choice.getBaseType()) { + type = baseType->getTypeOfMember(DC->getParentModule(), memberDecl, + type); } + return std::make_pair(decl, type); } } } return None; } +static Optional> +getStorageWrapperInformationFromDecl(VarDecl *decl) { + if (!decl->hasAttachedPropertyWrapper()) + return None; + + auto storageWrapper = decl->getPropertyWrapperStorageWrapper(); + if (!storageWrapper) + return None; + + return std::make_pair(storageWrapper, storageWrapper->getInterfaceType()); +} + Optional> -ConstraintSystem::getPropertyWrapperInformation(SelectedOverload resolvedOverload) { - if (resolvedOverload.choice.isDecl()) { - if (auto *decl = dyn_cast(resolvedOverload.choice.getDecl())) { - if (decl->hasAttachedPropertyWrapper()) { - auto wrapperTy = decl->getPropertyWrapperBackingPropertyType(); - if (Type baseType = resolvedOverload.choice.getBaseType()) { - wrapperTy = baseType->getTypeOfMember(DC->getParentModule(), - decl, wrapperTy); - } - return std::make_pair(decl, wrapperTy); - } - } - } - return None; +ConstraintSystem::getStorageWrapperInformation( + SelectedOverload resolvedOverload) { + return getPropertyWrappersInformationFromOverload( + resolvedOverload, DC, + [](VarDecl *decl) { return getStorageWrapperInformationFromDecl(decl); }); +} + +static Optional> +getPropertyWrapperInformationFromDecl(VarDecl *decl) { + if (!decl->hasAttachedPropertyWrapper()) + return None; + + return std::make_pair(decl, decl->getPropertyWrapperBackingPropertyType()); } Optional> -ConstraintSystem::getWrappedPropertyInformation(SelectedOverload resolvedOverload) { - if (resolvedOverload.choice.isDecl()) { - if (auto *decl = dyn_cast(resolvedOverload.choice.getDecl())) { - if (auto wrapped = decl->getOriginalWrappedProperty()) { - Type type = wrapped->getInterfaceType(); - if (Type baseType = resolvedOverload.choice.getBaseType()) { - type = baseType->getTypeOfMember(DC->getParentModule(), - wrapped, type); - } - return std::make_pair(decl, type); - } - } - } +ConstraintSystem::getPropertyWrapperInformation( + SelectedOverload resolvedOverload) { + return getPropertyWrappersInformationFromOverload( + resolvedOverload, DC, [](VarDecl *decl) { + return getPropertyWrapperInformationFromDecl(decl); + }); +} + +static Optional> +getWrappedPropertyInformationFromDecl(VarDecl *decl) { + if (auto wrapped = decl->getOriginalWrappedProperty()) + return std::make_pair(decl, wrapped->getInterfaceType()); + return None; } +Optional> +ConstraintSystem::getWrappedPropertyInformation( + SelectedOverload resolvedOverload) { + return getPropertyWrappersInformationFromOverload( + resolvedOverload, DC, [](VarDecl *decl) { + return getWrappedPropertyInformationFromDecl(decl); + }); +} + /// Does a var or subscript produce an l-value? /// /// \param baseType - the type of the base on which this object From cc15c0b8dd40d5a1a48ed96c1b097999331119fb Mon Sep 17 00:00:00 2001 From: Luciano Almeida Date: Sun, 31 May 2020 12:28:19 -0300 Subject: [PATCH 3/6] [ConstraintSystem] Remove unnecessary check for decl and use getDeclOrNNull --- lib/Sema/ConstraintSystem.cpp | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/lib/Sema/ConstraintSystem.cpp b/lib/Sema/ConstraintSystem.cpp index 854dcf019638d..4e5dae6538a7b 100644 --- a/lib/Sema/ConstraintSystem.cpp +++ b/lib/Sema/ConstraintSystem.cpp @@ -929,22 +929,21 @@ TypeVariableType *ConstraintSystem::isRepresentativeFor( } static Optional> -getPropertyWrappersInformationFromOverload( +getPropertyWrapperInformationFromOverload( SelectedOverload resolvedOverload, DeclContext *DC, llvm::function_ref>(VarDecl *)> getInformation) { - if (resolvedOverload.choice.isDecl()) { - if (auto *decl = dyn_cast(resolvedOverload.choice.getDecl())) { - if (auto declInformation = getInformation(decl)) { - Type type; - VarDecl *memberDecl; - std::tie(memberDecl, type) = *declInformation; - if (Type baseType = resolvedOverload.choice.getBaseType()) { - type = baseType->getTypeOfMember(DC->getParentModule(), memberDecl, - type); - } - return std::make_pair(decl, type); + if (auto *decl = + dyn_cast_or_null(resolvedOverload.choice.getDeclOrNull())) { + if (auto declInformation = getInformation(decl)) { + Type type; + VarDecl *memberDecl; + std::tie(memberDecl, type) = *declInformation; + if (Type baseType = resolvedOverload.choice.getBaseType()) { + type = baseType->getTypeOfMember(DC->getParentModule(), memberDecl, + type); } + return std::make_pair(decl, type); } } return None; @@ -965,7 +964,7 @@ getStorageWrapperInformationFromDecl(VarDecl *decl) { Optional> ConstraintSystem::getStorageWrapperInformation( SelectedOverload resolvedOverload) { - return getPropertyWrappersInformationFromOverload( + return getPropertyWrapperInformationFromOverload( resolvedOverload, DC, [](VarDecl *decl) { return getStorageWrapperInformationFromDecl(decl); }); } @@ -981,7 +980,7 @@ getPropertyWrapperInformationFromDecl(VarDecl *decl) { Optional> ConstraintSystem::getPropertyWrapperInformation( SelectedOverload resolvedOverload) { - return getPropertyWrappersInformationFromOverload( + return getPropertyWrapperInformationFromOverload( resolvedOverload, DC, [](VarDecl *decl) { return getPropertyWrapperInformationFromDecl(decl); }); @@ -998,7 +997,7 @@ getWrappedPropertyInformationFromDecl(VarDecl *decl) { Optional> ConstraintSystem::getWrappedPropertyInformation( SelectedOverload resolvedOverload) { - return getPropertyWrappersInformationFromOverload( + return getPropertyWrapperInformationFromOverload( resolvedOverload, DC, [](VarDecl *decl) { return getWrappedPropertyInformationFromDecl(decl); }); From c91211c3ad02efbc1a9ba52aebb8f9810ac65d69 Mon Sep 17 00:00:00 2001 From: Luciano Almeida Date: Sun, 31 May 2020 17:07:25 -0300 Subject: [PATCH 4/6] [ConstraintSystem] Inline static method calls into the closures --- lib/Sema/ConstraintSystem.cpp | 59 +++++++++++++++-------------------- 1 file changed, 25 insertions(+), 34 deletions(-) diff --git a/lib/Sema/ConstraintSystem.cpp b/lib/Sema/ConstraintSystem.cpp index 4e5dae6538a7b..fa6e538308065 100644 --- a/lib/Sema/ConstraintSystem.cpp +++ b/lib/Sema/ConstraintSystem.cpp @@ -934,14 +934,14 @@ getPropertyWrapperInformationFromOverload( llvm::function_ref>(VarDecl *)> getInformation) { if (auto *decl = - dyn_cast_or_null(resolvedOverload.choice.getDeclOrNull())) { + dyn_cast_or_null(resolvedOverload.choice.getDeclOrNull())) { if (auto declInformation = getInformation(decl)) { Type type; VarDecl *memberDecl; std::tie(memberDecl, type) = *declInformation; if (Type baseType = resolvedOverload.choice.getBaseType()) { - type = baseType->getTypeOfMember(DC->getParentModule(), memberDecl, - type); + type = + baseType->getTypeOfMember(DC->getParentModule(), memberDecl, type); } return std::make_pair(decl, type); } @@ -949,57 +949,48 @@ getPropertyWrapperInformationFromOverload( return None; } -static Optional> -getStorageWrapperInformationFromDecl(VarDecl *decl) { - if (!decl->hasAttachedPropertyWrapper()) - return None; - - auto storageWrapper = decl->getPropertyWrapperStorageWrapper(); - if (!storageWrapper) - return None; - - return std::make_pair(storageWrapper, storageWrapper->getInterfaceType()); -} - Optional> ConstraintSystem::getStorageWrapperInformation( SelectedOverload resolvedOverload) { return getPropertyWrapperInformationFromOverload( resolvedOverload, DC, - [](VarDecl *decl) { return getStorageWrapperInformationFromDecl(decl); }); -} + [](VarDecl *decl) -> Optional> { + if (!decl->hasAttachedPropertyWrapper()) + return None; -static Optional> -getPropertyWrapperInformationFromDecl(VarDecl *decl) { - if (!decl->hasAttachedPropertyWrapper()) - return None; + auto storageWrapper = decl->getPropertyWrapperStorageWrapper(); + if (!storageWrapper) + return None; - return std::make_pair(decl, decl->getPropertyWrapperBackingPropertyType()); + return std::make_pair(storageWrapper, + storageWrapper->getInterfaceType()); + }); } Optional> ConstraintSystem::getPropertyWrapperInformation( SelectedOverload resolvedOverload) { return getPropertyWrapperInformationFromOverload( - resolvedOverload, DC, [](VarDecl *decl) { - return getPropertyWrapperInformationFromDecl(decl); - }); -} - -static Optional> -getWrappedPropertyInformationFromDecl(VarDecl *decl) { - if (auto wrapped = decl->getOriginalWrappedProperty()) - return std::make_pair(decl, wrapped->getInterfaceType()); + resolvedOverload, DC, + [](VarDecl *decl) -> Optional> { + if (!decl->hasAttachedPropertyWrapper()) + return None; - return None; + return std::make_pair(decl, + decl->getPropertyWrapperBackingPropertyType()); + }); } Optional> ConstraintSystem::getWrappedPropertyInformation( SelectedOverload resolvedOverload) { return getPropertyWrapperInformationFromOverload( - resolvedOverload, DC, [](VarDecl *decl) { - return getWrappedPropertyInformationFromDecl(decl); + resolvedOverload, DC, + [](VarDecl *decl) -> Optional> { + if (auto wrapped = decl->getOriginalWrappedProperty()) + return std::make_pair(decl, wrapped->getInterfaceType()); + + return None; }); } From de7033c47987679eb0ce6887ae20c5e3775b17a6 Mon Sep 17 00:00:00 2001 From: David Ungar Date: Fri, 5 Jun 2020 20:33:21 -0700 Subject: [PATCH 5/6] Simplest fix to a dependency bug. Better commenting-out --- lib/AST/AbstractSourceFileDepGraphFactory.cpp | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/lib/AST/AbstractSourceFileDepGraphFactory.cpp b/lib/AST/AbstractSourceFileDepGraphFactory.cpp index 390fe06dbfcbc..6a4ccfdf78ab6 100644 --- a/lib/AST/AbstractSourceFileDepGraphFactory.cpp +++ b/lib/AST/AbstractSourceFileDepGraphFactory.cpp @@ -79,14 +79,30 @@ void AbstractSourceFileDepGraphFactory::addAUsedDecl( const DependencyKey &defKey, const DependencyKey &useKey) { auto *defNode = g.findExistingNodeOrCreateIfNew(defKey, None, false /* = !isProvides */); + // If the depended-upon node is defined in this file, then don't // create an arc to the user, when the user is the whole file. // Otherwise, if the defNode's type-body fingerprint changes, // the whole file will be marked as dirty, losing the benefit of the // fingerprint. - if (defNode->getIsProvides() && - useKey.getKind() == NodeKind::sourceFileProvide) - return; + + // if (defNode->getIsProvides() && + // useKey.getKind() == NodeKind::sourceFileProvide) + // return; + + // Turns out the above three lines cause miscompiles, so comment them out + // for now. We might want them back if we can change the inputs to this + // function to be more precise. + + // Example of a miscompile: + // In main.swift + // func foo(_: Any) { print("Hello Any") } + // foo(123) + // Then add the following line to another file: + // func foo(_: Int) { print("Hello Int") } + // Although main.swift needs to get recompiled, the commented-out code below + // prevents that. + auto nullableUse = g.findExistingNode(useKey); assert(nullableUse.isNonNull() && "Use must be an already-added provides"); auto *useNode = nullableUse.get(); From da14e3119c8bfa942ff23f6d4f222cc74548f38e Mon Sep 17 00:00:00 2001 From: David Ungar Date: Sat, 6 Jun 2020 11:12:49 -0700 Subject: [PATCH 6/6] Fix tests to correspond --- test/Frontend/Fingerprints/class-fingerprint.swift | 7 +------ test/Frontend/Fingerprints/enum-fingerprint.swift | 7 +------ test/Frontend/Fingerprints/protocol-fingerprint.swift | 6 +----- test/Frontend/Fingerprints/struct-fingerprint.swift | 7 +------ .../Driver/TypeBodyFingerprintsDependencyGraphTests.cpp | 4 ++-- 5 files changed, 6 insertions(+), 25 deletions(-) diff --git a/test/Frontend/Fingerprints/class-fingerprint.swift b/test/Frontend/Fingerprints/class-fingerprint.swift index 99c8bbeebbd30..3cab8d6e990c5 100644 --- a/test/Frontend/Fingerprints/class-fingerprint.swift +++ b/test/Frontend/Fingerprints/class-fingerprint.swift @@ -71,9 +71,4 @@ // only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-MAINB-RECOMPILED %s < %t/output4 - -// CHECK-MAINB-RECOMPILED-NOT: Queuing because of dependencies discovered later: {compile: usesB.o <= usesB.swift} -// CHECK-MAINB-RECOMPILED: Queuing because of dependencies discovered later: {compile: usesA.o <= usesA.swift} -// CHECK-MAINB-RECOMPILED-NOT: Queuing because of dependencies discovered later: {compile: usesB.o <= usesB.swift} - +// RUN: %FileCheck -check-prefix=CHECK-MAINAB-RECOMPILED %s < %t/output4 diff --git a/test/Frontend/Fingerprints/enum-fingerprint.swift b/test/Frontend/Fingerprints/enum-fingerprint.swift index 87564d0461242..05083f4f7ec9b 100644 --- a/test/Frontend/Fingerprints/enum-fingerprint.swift +++ b/test/Frontend/Fingerprints/enum-fingerprint.swift @@ -71,9 +71,4 @@ // only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-MAINB-RECOMPILED %s < %t/output4 - -// CHECK-MAINB-RECOMPILED-NOT: Queuing because of dependencies discovered later: {compile: usesB.o <= usesB.swift} -// CHECK-MAINB-RECOMPILED: Queuing because of dependencies discovered later: {compile: usesA.o <= usesA.swift} -// CHECK-MAINB-RECOMPILED-NOT: Queuing because of dependencies discovered later: {compile: usesB.o <= usesB.swift} - +// RUN: %FileCheck -check-prefix=CHECK-MAINAB-RECOMPILED %s < %t/output4 diff --git a/test/Frontend/Fingerprints/protocol-fingerprint.swift b/test/Frontend/Fingerprints/protocol-fingerprint.swift index 4bf913339d776..62a9ddd000878 100644 --- a/test/Frontend/Fingerprints/protocol-fingerprint.swift +++ b/test/Frontend/Fingerprints/protocol-fingerprint.swift @@ -71,9 +71,5 @@ // only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-MAINB-RECOMPILED %s < %t/output4 - -// CHECK-MAINB-RECOMPILED-NOT: Queuing because of dependencies discovered later: {compile: usesB.o <= usesB.swift} -// CHECK-MAINB-RECOMPILED: Queuing because of dependencies discovered later: {compile: usesA.o <= usesA.swift} -// CHECK-MAINB-RECOMPILED-NOT: Queuing because of dependencies discovered later: {compile: usesB.o <= usesB.swift} +// RUN: %FileCheck -check-prefix=CHECK-MAINAB-RECOMPILED %s < %t/output4 diff --git a/test/Frontend/Fingerprints/struct-fingerprint.swift b/test/Frontend/Fingerprints/struct-fingerprint.swift index cc6cfb28547a4..a0c9012a7c422 100644 --- a/test/Frontend/Fingerprints/struct-fingerprint.swift +++ b/test/Frontend/Fingerprints/struct-fingerprint.swift @@ -71,9 +71,4 @@ // only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps -// RUN: %FileCheck -check-prefix=CHECK-MAINB-RECOMPILED %s < %t/output4 - -// CHECK-MAINB-RECOMPILED-NOT: Queuing because of dependencies discovered later: {compile: usesB.o <= usesB.swift} -// CHECK-MAINB-RECOMPILED: Queuing because of dependencies discovered later: {compile: usesA.o <= usesA.swift} -// CHECK-MAINB-RECOMPILED-NOT: Queuing because of dependencies discovered later: {compile: usesB.o <= usesB.swift} - +// RUN: %FileCheck -check-prefix=CHECK-MAINAB-RECOMPILED %s < %t/output4 diff --git a/unittests/Driver/TypeBodyFingerprintsDependencyGraphTests.cpp b/unittests/Driver/TypeBodyFingerprintsDependencyGraphTests.cpp index b42543e57136e..c47007edc4297 100644 --- a/unittests/Driver/TypeBodyFingerprintsDependencyGraphTests.cpp +++ b/unittests/Driver/TypeBodyFingerprintsDependencyGraphTests.cpp @@ -807,10 +807,10 @@ TEST(ModuleDepGraph, UseFingerprints) { { const auto jobs = simulateReload(graph, &job0, {{NodeKind::nominal, {"A1@11", "A2@2"}}}); - EXPECT_EQ(2u, jobs.size()); + EXPECT_EQ(3u, jobs.size()); EXPECT_TRUE(contains(jobs, &job0)); EXPECT_TRUE(contains(jobs, &job1)); - EXPECT_FALSE(contains(jobs, &job2)); + EXPECT_TRUE(contains(jobs, &job2)); EXPECT_FALSE(contains(jobs, &job3)); } }