Skip to content

Commit 1cb57b6

Browse files
committed
Driver: perform the ModuleWrap job for COFF
The ModuleWrap job is responsible for wrapping the AST into the swift module. It was only enabled for ELF objects, but COFF needs this operation to be performed as well. Enable this for the COFF targets as well. This is needed to fix the DebugInfo AST Section verification.
1 parent 48d8ed0 commit 1cb57b6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Driver/Driver.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1946,7 +1946,8 @@ void Driver::buildActions(SmallVectorImpl<const Action *> &TopLevelActions,
19461946

19471947
if (MergeModuleAction) {
19481948
if (OI.DebugInfoLevel == IRGenDebugInfoLevel::Normal) {
1949-
if (TC.getTriple().getObjectFormat() == llvm::Triple::ELF) {
1949+
if (TC.getTriple().getObjectFormat() == llvm::Triple::ELF ||
1950+
TC.getTriple().getObjectFormat() == llvm::Triple::COFF) {
19501951
auto *ModuleWrapAction =
19511952
C.createAction<ModuleWrapJobAction>(MergeModuleAction);
19521953
LinkAction->addInput(ModuleWrapAction);

0 commit comments

Comments
 (0)