The Assignment Tracking debug-info feature is outlined in this RFC. This first series of patches adds documentation, the changes necessary to start emitting and using the new metadata, and updates clang with an option to enable the feature. Working with the new metadata in the middle and back end will come later. There are still a few rough edges but I'm putting these patches up now hoping to get feedback on the design and implementation from the upstream community.
Add the DIAssignID metadata attachment boilerplate. Includes a textual-bitcode roundtrip test.
This piece of metadata links together stores (used as an attachment) and the yet-to-be-added llvm.dbg.assign debug intrinsic (used as an operand).
I wonder what the rules are about assigning these numbers -- they can create future backwards compatibility problems. I suppose this isn't a significant issue until LLVM starts generating bitcode containing these metadata nodes, something that isn't going to happen for quite a while (with this patch series being behind an experimental flag).