Skip to content

Commit 9546cc2

Browse files
committed
IRGen: always provide DLLStorage
Now that DLLStorage is only applied when needed, always pass the correct DLLStorage. The IRLinkage applicator will determine if the DLLStorage should be applied or not.
1 parent e187c65 commit 9546cc2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/IRGen/IRGenModule.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -962,9 +962,7 @@ void IRGenModule::addLinkLibrary(const LinkLibrary &linkLib) {
962962
Module.getOrInsertFunction(buf, llvm::FunctionType::get(VoidTy, false));
963963
ApplyIRLinkage({llvm::GlobalValue::ExternalLinkage,
964964
llvm::GlobalValue::DefaultVisibility,
965-
useDllStorage()
966-
? llvm::GlobalValue::DLLImportStorageClass
967-
: llvm::GlobalValue::DefaultStorageClass})
965+
llvm::GlobalValue::DLLImportStorageClass})
968966
.to(cast<llvm::GlobalValue>(ForceImportThunk));
969967

970968
buf += "_$";
@@ -1088,9 +1086,7 @@ void IRGenModule::emitAutolinkInfo() {
10881086
&Module);
10891087
ApplyIRLinkage({llvm::GlobalValue::ExternalLinkage,
10901088
llvm::GlobalValue::DefaultVisibility,
1091-
useDllStorage()
1092-
? llvm::GlobalValue::DLLExportStorageClass
1093-
: llvm::GlobalValue::DefaultStorageClass})
1089+
llvm::GlobalValue::DLLExportStorageClass})
10941090
.to(ForceImportThunk);
10951091

10961092
auto BB = llvm::BasicBlock::Create(getLLVMContext(), "", ForceImportThunk);

0 commit comments

Comments
 (0)