Static archives can contain multiple files with the same file name, in which case the timestamp is used to disambiguate. Because timestamps are expressed in seconds since epoch timestamp collisions are far from impossible. Furthermore, to facilitate reproducible builds, the static linker can be told to emit no timestamps at all.
dsymutil already detects timestamp mismatches between the debug map and the object files. However, it does not handle timestamp collisions within the debug maps (STABS). Currently, we arbitrarily pick the first debug map entry and ignore the rest. This is incorrect: if a symbol exists in multiple object files, the linker might not have picked the one from the first object file. This also results in missing symbol warnings for all the symbols not defined in the first object file.
Given that in this scenario, dsymutil does not have enough information to disambiguate, it should instead print a single informative warning and skip the ambiguous debug map objects.
rdar://110374836
A hack I used in other places was to use a struct that inherits from std::pair<StringRef, uint64_t> and write accessors, then you don't need to define all the hashing and comparison functions.