Currently when a non-fatal warning is emitted, linking of modules can typically continue, however, the user is flooded with non-helpful warnings that do not hint at the possible source of the warning. This is especially relevant when DWARFv4 and DWARFv5 modules are linked which can happen when migrating to newer debug info.
This produces a flurry of messages along the lines of:
ld.lld: warning: linking module flags 'Dwarf Version': IDs have conflicting values ld.lld: warning: linking module flags 'Dwarf Version': IDs have conflicting values ld.lld: warning: linking module flags 'Dwarf Version': IDs have conflicting values
That kind of output is not especially helpful when trying to pinpoint the culprit source modules. This relatively simple patch improves the quality of non-fatal warnings from IRMover by emitting names of the source modules and in case of DWARF version mismatches, the mismatching versions (common case being 4 and 5).
That diagnostics code lack any test coverage and I can't think of a way to easily and deliberately produce mismatching modules using lit tests, and this diagnostic is not used as part of any current lit test in all of LLVM. Adding test coverage to all such diagnostics would be a much bigger task in itself and should likely be addressed separately since currently all of them lack any coverage.