mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[serialization] Hook up a module loader that just builds a TranslationUnit.
The writer stores the paths to the .swift files, the reader just loads those .swift files. Fun! No version validation yet. No separate ModuleReader class yet. No use of the SerializedModule architecture yet, except for creating a dummy module when the .sm file is corrupted. Swift SVN r5164
This commit is contained in:
@@ -49,8 +49,14 @@ public:
|
||||
/// \returns the module referenced, if it could be loaded. Otherwise,
|
||||
/// emits a diagnostic and returns NULL.
|
||||
virtual Module *
|
||||
loadModule(SourceLoc importLoc,
|
||||
ArrayRef<std::pair<Identifier, SourceLoc>> path) override;
|
||||
loadModule(SourceLoc importLoc, Module::AccessPathTy path) override;
|
||||
|
||||
private:
|
||||
/// Report an error in reading a module file.
|
||||
///
|
||||
/// \returns A dummy module, to prevent reloadeding
|
||||
// FIXME: This should move to a dedicated Reader class.
|
||||
Module *error(std::pair<Identifier, SourceLoc> importLoc);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user