Skip to content

Commit a64f3f2

Browse files
author
David Ungar
committed
Fix Mocking code.
1 parent d913dfe commit a64f3f2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

unittests/Driver/MockingFineGrainedDependencyGraphs.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,14 @@ mocking_fine_grained_dependency_graphs::getChangesForSimulatedLoad(
4444
cmd->getOutput().getAdditionalOutputForType(file_types::TY_SwiftDeps).str();
4545
assert(!swiftDeps.empty());
4646
swiftDeps.resize(Fingerprint::DIGEST_LENGTH, 'X');
47+
auto swiftDepsFingerprint = Fingerprint::fromString(swiftDeps);
48+
if (!swiftDepsFingerprint) {
49+
llvm::errs() << "unconvertable fingerprint from switdeps ':"
50+
<< swiftDeps << "'\n";
51+
abort();
52+
}
4753
auto interfaceHash =
48-
interfaceHashIfNonEmpty.getValueOr(Fingerprint::fromString(swiftDeps));
54+
interfaceHashIfNonEmpty.getValueOr(swiftDepsFingerprint.getValue());
4955

5056
SourceManager sm;
5157
DiagnosticEngine diags(sm);

0 commit comments

Comments
 (0)