Skip to content

Commit f2c271f

Browse files
committed
DO NOT MERGE
1 parent e02ccd5 commit f2c271f

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

SwiftCompilerSources/Sources/Optimizer/PassManager/PassRegistration.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
import SIL
1414
import OptimizerBridging
1515
import Parse
16+
import std
1617

1718
@_cdecl("initializeSwiftModules")
1819
public func initializeSwiftModules() {
1920
registerSILClasses()
2021
registerSwiftPasses()
2122
registerRegexParser()
23+
std.string()
2224
}
2325

2426
private func registerPass(

lib/ClangImporter/ImportDecl.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3825,7 +3825,15 @@ namespace {
38253825
if (!isCxxRecordImportable(decl))
38263826
return nullptr;
38273827

3828-
return VisitRecordDecl(decl);
3828+
auto result = VisitRecordDecl(decl);
3829+
3830+
if (result && decl->getTemplateInstantiationPattern()) {
3831+
auto &lt = Impl.BridgingHeaderLookupTable;
3832+
addEntryToLookupTable(*lt, const_cast<clang::CXXRecordDecl *>(decl),
3833+
Impl.getNameImporter());
3834+
}
3835+
3836+
return result;
38293837
}
38303838

38313839
bool isSpecializationDepthGreaterThan(

0 commit comments

Comments
 (0)