Skip to content

Commit a59e909

Browse files
Merge pull request #17384 from adrian-prantl/40950542-revert
Revert "Restrict RemoteASTTypeBuilder::findModule() to the list of lo…
2 parents 8b9dd25 + 9bc3949 commit a59e909

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/RemoteAST/RemoteAST.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -570,13 +570,7 @@ RemoteASTTypeBuilder::createNominalTypeDecl(const Demangle::NodePointer &node) {
570570
ModuleDecl *RemoteASTTypeBuilder::findModule(const Demangle::NodePointer &node){
571571
assert(node->getKind() == Demangle::Node::Kind::Module);
572572
const auto &moduleName = node->getText();
573-
// Intentionally using getLoadedModule() instead of getModuleByName() here.
574-
// LLDB uses RemoteAST for its per-module SwiftASTContext. Importing external
575-
// modules here could permanently damage this context, for example when a
576-
// Clang import fails because of missing header search options. To avoid this
577-
// situation, restrict RemoteAST's access to only the module's transitive
578-
// closure of imports.
579-
return Ctx.getLoadedModule(Ctx.getIdentifier(moduleName));
573+
return Ctx.getModuleByName(moduleName);
580574
}
581575

582576
Demangle::NodePointer

0 commit comments

Comments
 (0)