mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Accept swiftmodule files on the command line as partial AST inputs.
Each loaded file gets added to the main module, rather than being a standalone separate module. In theory, this will be used to assemble several partial ASTs into a complete module. In practice, there's still a ways to go...but this can already round-trip a single module file. This also factors out the FileUnit-creating part of SerializedModuleLoader, which should help clients like SourceKit that don't need to search for a swiftmodule file associated with a particular import. Swift SVN r10952
This commit is contained in:
@@ -268,7 +268,7 @@ static Optional<swift::LibraryKind> getActualLibraryKind(unsigned rawKind) {
|
||||
}
|
||||
|
||||
|
||||
ModuleFile::ModuleFile(llvm::OwningPtr<llvm::MemoryBuffer> &&input)
|
||||
ModuleFile::ModuleFile(std::unique_ptr<llvm::MemoryBuffer> input)
|
||||
: FileContext(nullptr),
|
||||
InputFile(std::move(input)),
|
||||
InputReader(reinterpret_cast<const uint8_t *>(InputFile->getBufferStart()),
|
||||
|
||||
Reference in New Issue
Block a user