@@ -26,7 +26,7 @@ using namespace mocking_fine_grained_dependency_graphs;
26
26
void mocking_fine_grained_dependency_graphs::simulateLoad (
27
27
ModuleDepGraph &g, const driver::Job *cmd,
28
28
const DependencyDescriptions &dependencyDescriptions,
29
- StringRef interfaceHashIfNonEmpty,
29
+ Optional<Fingerprint> interfaceHashIfNonEmpty,
30
30
const bool hadCompilationError) {
31
31
const auto changes = getChangesForSimulatedLoad (
32
32
g, cmd, dependencyDescriptions, interfaceHashIfNonEmpty,
@@ -38,13 +38,14 @@ ModuleDepGraph::Changes
38
38
mocking_fine_grained_dependency_graphs::getChangesForSimulatedLoad (
39
39
ModuleDepGraph &g, const driver::Job *cmd,
40
40
const DependencyDescriptions &dependencyDescriptions,
41
- StringRef interfaceHashIfNonEmpty,
41
+ Optional<Fingerprint> interfaceHashIfNonEmpty,
42
42
const bool hadCompilationError) {
43
- StringRef swiftDeps =
44
- cmd->getOutput ().getAdditionalOutputForType (file_types::TY_SwiftDeps);
43
+ auto swiftDeps =
44
+ cmd->getOutput ().getAdditionalOutputForType (file_types::TY_SwiftDeps). str ( );
45
45
assert (!swiftDeps.empty ());
46
- StringRef interfaceHash =
47
- interfaceHashIfNonEmpty.empty () ? swiftDeps : interfaceHashIfNonEmpty;
46
+ swiftDeps.resize (Fingerprint::DIGEST_LENGTH, ' X' );
47
+ auto interfaceHash =
48
+ interfaceHashIfNonEmpty.getValueOr (Fingerprint{swiftDeps});
48
49
49
50
SourceManager sm;
50
51
DiagnosticEngine diags (sm);
@@ -63,7 +64,7 @@ std::vector<const driver::Job *>
63
64
mocking_fine_grained_dependency_graphs::simulateReload (
64
65
ModuleDepGraph &g, const driver::Job *cmd,
65
66
const DependencyDescriptions &dependencyDescriptions,
66
- StringRef interfaceHashIfNonEmpty,
67
+ Optional<Fingerprint> interfaceHashIfNonEmpty,
67
68
const bool hadCompilationError) {
68
69
const auto changedNodes = getChangesForSimulatedLoad (
69
70
g, cmd, dependencyDescriptions, interfaceHashIfNonEmpty,
0 commit comments