Skip to content

Commit b1bbe48

Browse files
authored
Merge pull request #12492 from compnerd/windows-code-model
2 parents 98ba6a4 + 8ab7956 commit b1bbe48

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

lib/IRGen/IRGen.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -544,17 +544,9 @@ swift::createTargetMachine(IRGenOptions &Opts, ASTContext &Ctx) {
544544
}
545545

546546
// Create a target machine.
547-
auto cmodel = CodeModel::Default;
548-
549-
// On Windows 64 bit, dlls are loaded above the max address for 32 bits.
550-
// This means that a default CodeModel causes generated code to segfault
551-
// when run.
552-
if (Triple.isArch64Bit() && Triple.isOSWindows())
553-
cmodel = CodeModel::Large;
554-
555547
llvm::TargetMachine *TargetMachine =
556548
Target->createTargetMachine(Triple.str(), CPU, targetFeatures, TargetOpts,
557-
Reloc::PIC_, cmodel, OptLevel);
549+
Reloc::PIC_, CodeModel::Default, OptLevel);
558550
if (!TargetMachine) {
559551
Ctx.Diags.diagnose(SourceLoc(), diag::no_llvm_target,
560552
Triple.str(), "no LLVM target machine");

0 commit comments

Comments
 (0)