Skip to content

Commit ca28b99

Browse files
authored
Merge pull request #33436 from CodaFi/keys-to-the-kingdom
Fixup IdentifierInfo Key Confusion
2 parents b04ec81 + 7d3d4de commit ca28b99

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,6 @@ bool ClangImporter::canImportModule(Located<Identifier> moduleID) {
17141714

17151715
ModuleDecl *ClangImporter::Implementation::loadModuleClang(
17161716
SourceLoc importLoc, ArrayRef<Located<Identifier>> path) {
1717-
auto &clangContext = getClangASTContext();
17181717
auto &clangHeaderSearch = getClangPreprocessor().getHeaderSearchInfo();
17191718

17201719
// Look up the top-level module first, to see if it exists at all.
@@ -1728,8 +1727,9 @@ ModuleDecl *ClangImporter::Implementation::loadModuleClang(
17281727
SmallVector<std::pair<clang::IdentifierInfo *, clang::SourceLocation>, 4>
17291728
clangPath;
17301729
for (auto component : path) {
1731-
clangPath.push_back({&clangContext.Idents.get(component.Item.str()),
1732-
exportSourceLoc(component.Loc)});
1730+
clangPath.emplace_back(
1731+
getClangPreprocessor().getIdentifierInfo(component.Item.str()),
1732+
exportSourceLoc(component.Loc));
17331733
}
17341734

17351735
auto &rawDiagClient = Instance->getDiagnosticClient();

0 commit comments

Comments
 (0)