It was requested during review of D26283 (which already landed) to share the code
for parsing pubnames/pubtypes.
Patch implements that parser instead of static function which was used before.
So it should be possible to reuse in LLD now and clean up the duplication code.