mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Serialization] Serialize/deserialize source file list
This commit is contained in:
@@ -1514,6 +1514,17 @@ const clang::Module *ModuleDecl::findUnderlyingClangModule() const {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ModuleDecl::collectSourceFileNames(
|
||||
llvm::function_ref<void(StringRef)> callback) {
|
||||
for (FileUnit *fileUnit : getFiles()) {
|
||||
if (SourceFile *SF = dyn_cast<SourceFile>(fileUnit)) {
|
||||
callback(SF->getFilename());
|
||||
} else if (auto *serialized = dyn_cast<LoadedFile>(fileUnit)) {
|
||||
serialized->collectSourceFileNames(callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Cross-Import Overlays
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
Reference in New Issue
Block a user