mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add Module::failedToLoad(), mainly for REPL and debugging purposes.
LLDB asked for this to differentiate between modules loaded successfully and modules that are correctly found but can't be loaded for some reason. rdar://problem/19750055 Swift SVN r27041
This commit is contained in:
@@ -364,8 +364,11 @@ Module *SerializedModuleLoader::loadModule(SourceLoc importLoc,
|
||||
auto M = Module::create(moduleID.first, Ctx);
|
||||
Ctx.LoadedModules[moduleID.first] = M;
|
||||
|
||||
(void)loadAST(*M, moduleID.second, std::move(moduleInputBuffer),
|
||||
std::move(moduleDocInputBuffer), isFramework);
|
||||
if (!loadAST(*M, moduleID.second, std::move(moduleInputBuffer),
|
||||
std::move(moduleDocInputBuffer), isFramework)) {
|
||||
M->setFailedToLoad();
|
||||
}
|
||||
|
||||
return M;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user