Per LLVM's CommandGuide, llvm-profdata show -text is supposed to produce textual output that can be passed as input to further llvm-profdata invocations. This doesn't currently work for two reasons:
- -text was not sufficient to enable the machine-readable text format output; instead, -text was effectively ignored if -counts was not also specified. (With this patch, -counts is instead ignored if -text is specified, because the machine-readable text format always includes counts.)
- When the input data was an IR-level profile, the :ir marker was missing from the output, resulting in a text format output that would not be usable as profiling data due to function hash mismatches.