Skip to content

Commit 7c63d03

Browse files
committed
Clean up.
1 parent ad6b7aa commit 7c63d03

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

include/swift/AST/DiagnosticsParse.def

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ ERROR(sil_witness_assoc_conf_not_found,none,
686686
ERROR(sil_witness_protocol_conformance_not_found,none,
687687
"sil protocol conformance not found", ())
688688

689-
// [differentiable ...] (sil-decl attr)
689+
// SIL differentiability witnesses
690690
ERROR(sil_diff_witness_expected_keyword,PointsToFirstBadToken,
691691
"expected '%0' in differentiability witness", (StringRef))
692692
ERROR(sil_diff_witness_expected_parameter_list,PointsToFirstBadToken,
@@ -698,8 +698,6 @@ ERROR(sil_diff_witness_expected_parameter_index,PointsToFirstBadToken,
698698
ERROR(sil_diff_witness_expected_source_index,PointsToFirstBadToken,
699699
"expected the index of a result to differentiate from", ())
700700

701-
// SIL differentiability witnesses
702-
703701
// SIL Coverage Map
704702
ERROR(sil_coverage_func_not_found, none,
705703
"sil function not found %0", (Identifier))

lib/Serialization/DeserializeSIL.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,7 @@ SILDeserializer::SILDeserializer(
148148
// SIL_DEFAULT_WITNESS_TABLE_NAMES. But each one can be
149149
// omitted if no entries exist in the module file.
150150
unsigned kind = 0;
151-
// SWIFT_ENABLE_TENSORFLOW
152151
while (kind != sil_index_block::SIL_PROPERTY_OFFSETS) {
153-
// SWIFT_ENABLE_TENSORFLOW END
154152
auto next = cursor.advance();
155153
if (next.Kind == llvm::BitstreamEntry::EndBlock)
156154
return;
@@ -225,12 +223,14 @@ SILDeserializer::SILDeserializer(
225223
offKind == sil_index_block::SIL_DEFAULT_WITNESS_TABLE_OFFSETS) &&
226224
"Expect a SIL_DEFAULT_WITNESS_TABLE_OFFSETS record.");
227225
MF->allocateBuffer(DefaultWitnessTables, scratch);
226+
// SWIFT_ENABLE_TENSORFLOW
228227
} else if (kind == sil_index_block::SIL_DIFFERENTIABILITY_WITNESS_NAMES) {
229228
assert((next.Kind == llvm::BitstreamEntry::Record &&
230229
offKind ==
231230
sil_index_block::SIL_DIFFERENTIABILITY_WITNESS_OFFSETS) &&
232231
"Expect a SIL_DIFFERENTIABILITY_WITNESS_OFFSETS record.");
233232
MF->allocateBuffer(DifferentiabilityWitnesses, scratch);
233+
// SWIFT_ENABLE_TENSORFLOW END
234234
}
235235
}
236236
}

lib/Serialization/SerializeSIL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2666,7 +2666,7 @@ void SILSerializer::writeSILBlock(const SILModule *SILMod) {
26662666
// SWIFT_ENABLE_TENSORFLOW
26672667
// Write out differentiability witnesses.
26682668
for (const auto &diffWitness : SILMod->getDifferentiabilityWitnessList()) {
2669-
// TODO: Consider checking
2669+
// TODO(TF-893): Consider checking
26702670
// `SILMod->shouldSerializeEntitiesAssociatedWithDeclContext` on the JVP/VJP
26712671
// functions.
26722672
if ((ShouldSerializeAll || diffWitness.isSerialized()))

0 commit comments

Comments
 (0)