Index: lib/Linker/IRMover.cpp =================================================================== --- lib/Linker/IRMover.cpp +++ lib/Linker/IRMover.cpp @@ -1230,8 +1230,20 @@ case Module::Warning: { // Emit a warning if the values differ. if (SrcOp->getOperand(2) != DstOp->getOperand(2)) { - emitWarning("linking module flags '" + ID->getString() + - "': IDs have conflicting values"); + StringRef IDS = ID->getString(); + if (IDS == "Dwarf Version") + // For conflicting DWARF metadata, print the actual versions + // in addition to module names. + emitWarning("linking conflicting DWARF versions: v" + + Twine(SrcM->getDwarfVersion()) + + " from " + SrcM->getModuleIdentifier() + " to v" + + Twine(DstM.getDwarfVersion()) + " in "+ + DstM.getModuleIdentifier()); + else + emitWarning("linking module flags '" + IDS + + "': IDs have conflicting values (from " + + SrcM->getModuleIdentifier() + " to " + + DstM.getModuleIdentifier() + ")"); } continue; }