@@ -2705,9 +2705,6 @@ Address IRGenModule::getAddrOfSILGlobalVariable(SILGlobalVariable *var,
2705
2705
gvar->setInitializer (llvm::Constant::getNullValue (storageTypeWithContainer));
2706
2706
else
2707
2707
gvar->setComdat (nullptr );
2708
- if (gvar->getName ().equals (" $sSo18CFDateFormatterRefaMf" )) {
2709
- gvar->dump ();
2710
- }
2711
2708
}
2712
2709
llvm::Constant *addr = gvar;
2713
2710
if (var->isInitializedObject () && !canMakeStaticObjectsReadOnly ()) {
@@ -5040,7 +5037,8 @@ IRGenModule::getAddrOfTypeMetadata(CanType concreteType,
5040
5037
SymbolReferenceKind refKind,
5041
5038
TypeMetadataCanonicality canonicality) {
5042
5039
assert (!isa<UnboundGenericType>(concreteType));
5043
-
5040
+ if (concreteType->getString () == " " ) {
5041
+ }
5044
5042
auto nominal = concreteType->getAnyNominal ();
5045
5043
5046
5044
bool foreign = nominal && requiresForeignTypeMetadata (nominal);
@@ -5133,8 +5131,25 @@ IRGenModule::getAddrOfTypeMetadata(CanType concreteType,
5133
5131
typeOfValue = defaultVarTy;
5134
5132
}
5135
5133
5136
- if (auto *GV = dyn_cast<llvm::GlobalVariable>(addr.getValue ()))
5134
+ if (auto *GV = dyn_cast<llvm::GlobalVariable>(addr.getValue ())) {
5135
+
5136
+ if (addr.getValue ()->getName ().equals (" $sSo18CFDateFormatterRefaMf" )) {
5137
+ llvm::dbgs () << " Potentially removing COMDAT isDeclaration:" << GV->isDeclaration () << " \n " ;
5138
+ addr.getValue ()->dump ();
5139
+ }
5137
5140
GV->setComdat (nullptr );
5141
+ if (addr.getValue ()->getName ().equals (" $sSo18CFDateFormatterRefaMf" )) {
5142
+ addr.getValue ()->dump ();
5143
+ llvm::dbgs () << " concreteType: " << concreteType->getString () << " \n " ;
5144
+ }
5145
+ } else {
5146
+ if (addr.getValue ()->getName ().equals (" $sSo18CFDateFormatterRefaMf" )) {
5147
+ llvm::dbgs () << " Not removing COMDAT \n " ;
5148
+ addr.getValue ()->dump ();
5149
+ llvm::dbgs () << " concreteType: " << concreteType->getString () << " \n " ;
5150
+ }
5151
+ }
5152
+
5138
5153
5139
5154
// FIXME: MC breaks when emitting alias references on some platforms
5140
5155
// (rdar://problem/22450593 ). Work around this by referring to the aliasee
0 commit comments