mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Remove -l flag from Swift interim driver.
Being able to pass -l to the driver isn't so interesting, and it's an extra field that lives on TranslationUnit for no reason. Just remove it. This doesn't interfere with autolinking, i.e. inferring -l flags based on imported modules. Swift SVN r9241
This commit is contained in:
@@ -1038,20 +1038,12 @@ void Module::forAllVisibleModules(Optional<AccessPathTy> thisPath,
|
||||
void Module::collectLinkLibraries(LinkLibraryCallback callback) {
|
||||
forAllImportedModules<false>(this, AccessPathTy(),
|
||||
[=](ImportedModule import) -> bool {
|
||||
Module *module = import.second;
|
||||
if (isa<BuiltinModule>(module)) {
|
||||
// The Builtin module requires no libraries.
|
||||
auto loadedModule = dyn_cast<LoadedModule>(import.second);
|
||||
if (!loadedModule)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (auto TU = dyn_cast<TranslationUnit>(module)) {
|
||||
for (auto lib : TU->getLinkLibraries())
|
||||
callback(lib);
|
||||
return true;
|
||||
}
|
||||
|
||||
ModuleLoader &owner = cast<LoadedModule>(module)->getOwner();
|
||||
owner.getLinkLibraries(module, callback);
|
||||
|
||||
ModuleLoader &owner = loadedModule->getOwner();
|
||||
owner.getLinkLibraries(loadedModule, callback);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user