[PATCH] Do not emit thunks with available_externally linkage in comdats
Reid Kleckner
rnk at google.com
Thu May 7 16:08:04 PDT 2015
This is correct, but we have lots of instances that should use the same logic:
$ git grep supportsCOMDAT.*isWeakForLinker
lib/CodeGen/CGDecl.cpp: if (supportsCOMDAT() && GV->isWeakForLinker())
lib/CodeGen/CGVTT.cpp: if (CGM.supportsCOMDAT() && VTT->isWeakForLinker())
lib/CodeGen/CGVTables.cpp: if (CGM.supportsCOMDAT() && Fn->isWeakForLinker())
lib/CodeGen/CodeGenModule.cpp: if (supportsCOMDAT() && GV->isWeakForLinker() &&
lib/CodeGen/CodeGenModule.cpp: if (supportsCOMDAT() && GV->isWeakForLinker())
lib/CodeGen/ItaniumCXXABI.cpp: if (CGM.supportsCOMDAT() && VTable->isWeakForLinker())
lib/CodeGen/ItaniumCXXABI.cpp: } else if (CGM.supportsCOMDAT() && guard->isWeakForLinker()) {
lib/CodeGen/ItaniumCXXABI.cpp: if (CGM.supportsCOMDAT() && GV->isWeakForLinker())
How about we add a maybeSetTrivialComdat overload that takes a GlobalObject or something? I'm not asking you to do the migration if you don't want to, but just to add the central place that we should be calling to handle the case where we don't have an easily available Decl with GVA linkage.
http://reviews.llvm.org/D9580
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list