Skip to content

Commit

Permalink
Merge pull request swiftlang#25777 from compnerd/threaded-irgen
Browse files Browse the repository at this point in the history
IRGen: fix multithreaded COMDAT handling for PE/COFF
  • Loading branch information
compnerd authored Jun 27, 2019
2 parents 85c4447 + 053425a commit b5ae6a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/IRGen/GenDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3629,6 +3629,8 @@ ConstantReference IRGenModule::getAddrOfTypeMetadata(CanType concreteType,

auto addr = getAddrOfLLVMVariable(*entity, ConstantInit(), DbgTy, refKind,
defaultVarTy);
if (auto *GV = dyn_cast<llvm::GlobalVariable>(addr.getValue()))
GV->setComdat(nullptr);

// FIXME: MC breaks when emitting alias references on some platforms
// (rdar://problem/22450593 ). Work around this by referring to the aliasee
Expand Down

0 comments on commit b5ae6a4

Please sign in to comment.