+ // If corresponding function is weak definition, this should be too.
+ if ((linkage == Function::WeakLinkage ||
+ linkage == Function::LinkOnceLinkage) &&
+ TAI->getWeakDefDirective())
+ O << TAI->getWeakDefDirective() << EHFrameInfo.FnName << "\n";
+
+ // If there are no calls then you can't unwind. This may mean we can
+ // omit the EH Frame, but some environments do not handle weak absolute
+ // symbols.
+ if (!EHFrameInfo.hasCalls &&
+ ((linkage != Function::WeakLinkage &&
+ linkage != Function::LinkOnceLinkage) ||
+ !TAI->getWeakDefDirective() ||
+ TAI->getSupportsWeakOmittedEHFrame()))
+ {