Add an externally facing parser for the stackmap section generated for stackmaps, patchpoint, and statepoint. The intended users of the parser are consumers of LLVM - mainly users of MCJIT.
Our documented usage model for all of these intrinsics is to have users parse the stackmap format and generate whatever custom side tables they may require. We know have multiple active groups that need such a parser, so it's time to find a place to put it for code sharing. This code is base around code developed for our particular frontend. The LLILC group has expressed interest in getting access to the code and another unrelated user spoke up on llvm-dev today.
To be explicitly clear about support: the parser explicitly and intentionally only supports parsing the section generated by the exact same build of LLVM. There are NO compatibility guarantees provided even across major releases.
I would welcome suggestions on how to test this in tree. I didn't see any obvious places to add a stackmap section parser. Would it make sense to add a dedicated parser/printer tool? Or is there an existing one I can add to? I'm reasonable sure I've introduced at least one bug when migrating the code, but without backporting into my own tree, I don't have a way to flesh these out.
s/it's/its