IRGen: repair a small regression on Windows (#78689)

Correct the IRGen for the standard library. The thinko here assumed that the else case would be evaluated for the standard library build. We ended up incorrectly handling the well-known VWTs from the runtime when building the standard library.
This commit is contained in:
Saleem Abdulrasool
2025-01-20 19:00:05 -08:00
committed by GitHub
parent f753db23a9
commit 370cbca889
2 changed files with 4 additions and 4 deletions

View File

@@ -1297,8 +1297,8 @@ IRGenModule::createStringConstant(StringRef Str, bool willBeRelativelyAddressed,
if (NAME) \
return NAME; \
NAME = Module.getOrInsertGlobal(SYM, FullExistentialTypeMetadataStructTy); \
if (!getSwiftModule()->isStdlibModule() || \
!getSwiftModule()->isStaticLibrary()) \
if (!getSwiftModule()->isStdlibModule() && \
!Context.getStdlibModule(true)->isStaticLibrary()) \
ApplyIRLinkage(IRLinkage::ExternalImport) \
.to(cast<llvm::GlobalVariable>(NAME)); \
return NAME; \