Skip to content

Commit fc9de0d

Browse files
committed
IRGen: adjust the module hash section for COFF
COFF uses 8-character section names. Adjust the section name for the module hash from `.swift_modhash` to `.sw5hash` to fit this restriction.
1 parent df28df9 commit fc9de0d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/IRGen/IRGenModule.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,9 +1047,11 @@ bool IRGenModule::finalize() {
10471047
ModuleHash->setSection("__LLVM,__swift_modhash");
10481048
break;
10491049
case llvm::Triple::ELF:
1050-
case llvm::Triple::COFF:
10511050
ModuleHash->setSection(".swift_modhash");
10521051
break;
1052+
case llvm::Triple::COFF:
1053+
ModuleHash->setSection(".sw5hash");
1054+
break;
10531055
default:
10541056
llvm_unreachable("Don't know how to emit the module hash for the selected"
10551057
"object format.");

0 commit comments

Comments
 (0)