Useful for debugging since we lose this correlation after the permodule
summary/VST is read and until we later materialize source modules in the
function importer.
Details
Diff Detail
Event Timeline
That's close to what I implemented locally when I was debugging this code last month.
My plan to have a "nice" solution was to dump a map in a file that could be loaded by other pieces. For instance you could use the map file by doing opt -function-import .... -debug -debug-map-guid=path/to/map and expose an API that convert GUID to name.
Maybe on the short term it is not worth investing time in this and I won't oppose to add the easy solution you have.
Yea, I thought about something along those lines too, but decided the simple solution was sufficient for now. Note that this patch would be a subset of that approach anyway since it gives you the map that would be fed back in.
Well it is not clear to me that it is an intermediate step, because ultimately you need a way to merge the information. I would have tried to address it a thin-link time.
But, ok it is useful enough and there is no other concrete plan right now, so LGTM.