mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Correct the Serialization of Embedded Swift Dependencies
llvm-bcanalyzer does *not* like it when there are multiple block info metadata blocks in the same bitstream file. This patch will skip the emission of that and just jump straight to the metadata block when we're not reading a "standalone" incremental dependency file. While I'm here, also add the right block abbreviation info so we can get a decent dump from llvm-bcanalyzer
This commit is contained in:
@@ -861,6 +861,13 @@ void Serializer::writeBlockInfoBlock() {
|
||||
BLOCK_RECORD(sil_index_block, SIL_DIFFERENTIABILITY_WITNESS_NAMES);
|
||||
BLOCK_RECORD(sil_index_block, SIL_DIFFERENTIABILITY_WITNESS_OFFSETS);
|
||||
|
||||
BLOCK(INCREMENTAL_INFORMATION_BLOCK);
|
||||
BLOCK_RECORD(fine_grained_dependencies::record_block, METADATA);
|
||||
BLOCK_RECORD(fine_grained_dependencies::record_block, SOURCE_FILE_DEP_GRAPH_NODE);
|
||||
BLOCK_RECORD(fine_grained_dependencies::record_block, FINGERPRINT_NODE);
|
||||
BLOCK_RECORD(fine_grained_dependencies::record_block, DEPENDS_ON_DEFINITION_NODE);
|
||||
BLOCK_RECORD(fine_grained_dependencies::record_block, IDENTIFIER_NODE);
|
||||
|
||||
#undef BLOCK
|
||||
#undef BLOCK_RECORD
|
||||
}
|
||||
@@ -5231,8 +5238,9 @@ void Serializer::writeToStream(
|
||||
S.writeInputBlock(options);
|
||||
S.writeSIL(SILMod, options.SerializeAllSIL);
|
||||
S.writeAST(DC);
|
||||
if (options.ExperimentalCrossModuleIncrementalInfo) {
|
||||
S.writeIncrementalInfo(DepGraph);
|
||||
if (options.ExperimentalCrossModuleIncrementalInfo && DepGraph) {
|
||||
fine_grained_dependencies::writeFineGrainedDependencyGraph(
|
||||
S.Out, *DepGraph, /*standalone*/ false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user