Skip to content

Commit bac8fb0

Browse files
committed
more DEBUGGING
1 parent 74d13e3 commit bac8fb0

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

include/swift/IRGen/Linking.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,10 +1632,18 @@ class ApplyIRLinkage {
16321632
// apply the COMDAT.
16331633
if (definition)
16341634
if (IRL.Linkage == llvm::GlobalValue::LinkOnceODRLinkage ||
1635-
IRL.Linkage == llvm::GlobalValue::WeakODRLinkage)
1636-
if (Triple.supportsCOMDAT())
1637-
if (llvm::GlobalObject *GO = dyn_cast<llvm::GlobalObject>(GV))
1635+
IRL.Linkage == llvm::GlobalValue::WeakODRLinkage) {
1636+
if (Triple.supportsCOMDAT()) {
1637+
if (llvm::GlobalObject *GO = dyn_cast<llvm::GlobalObject>(GV)) {
1638+
if (GV->getName().equals("$sSo18CFDateFormatterRefaMf")) {
1639+
llvm::dbgs() << "Setting comdat in" << M->getName() << "\n";
1640+
}
16381641
GO->setComdat(M->getOrInsertComdat(GV->getName()));
1642+
}
1643+
}
1644+
} else if (GV->getName().equals("$sSo18CFDateFormatterRefaMf")){
1645+
llvm::dbgs() << "Not setting comdat in " << M->getName() << "\n";
1646+
}
16391647
}
16401648
};
16411649

lib/IRGen/GenDecl.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5135,6 +5135,10 @@ IRGenModule::getAddrOfTypeMetadata(CanType concreteType,
51355135

51365136
if (auto *GV = dyn_cast<llvm::GlobalVariable>(addr.getValue()))
51375137
GV->setComdat(nullptr);
5138+
if (addr.getValue()->getName().equals("$sSo18CFDateFormatterRefaMf")) {
5139+
addr.getValue()->dump();
5140+
}
5141+
51385142

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

0 commit comments

Comments
 (0)