mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Ensure that we serialize declarations in synthesized files
Without this, conformances synthesized by macros aren't visible across modules. Fixes rdar://109051626.
This commit is contained in:
@@ -6230,7 +6230,12 @@ void Serializer::writeAST(ModuleOrSourceFile DC) {
|
||||
Scratch.push_back(synthesizedFile);
|
||||
files = llvm::makeArrayRef(Scratch);
|
||||
} else {
|
||||
files = M->getFiles();
|
||||
for (auto file : M->getFiles()) {
|
||||
Scratch.push_back(file);
|
||||
if (auto *synthesizedFile = file->getSynthesizedFile())
|
||||
Scratch.push_back(synthesizedFile);
|
||||
}
|
||||
files = llvm::makeArrayRef(Scratch);
|
||||
}
|
||||
for (auto nextFile : files) {
|
||||
if (nextFile->hasEntryPoint())
|
||||
|
||||
Reference in New Issue
Block a user