This patch reverses the edge from DIGlobalVariable to GlobalVariable. In
order to make this work I also needed to implement the following extensions
for global attached metadata:
- I implemented a capability for globals to hold multiple metadata nodes with the same kind.
- I added a byte offset field to the global attached metadata list entries. The byte offset can be used to describe the position in the global that the metadata pertains to. Passes such as merge globals can copy metadata from one global to another, adjusting the offset if necessary. This field is intended to be generically useful, for example I plan to use it to hold the offsets currently used by "bitset" metadata in the vtable opt and CFI passes.
This isn't fully ready yet, but I wanted to gauge support for the new
representation before implementing the remaining pieces.
- Add bitcode read/write and upgrade support for the new constructs
- Use a DIExpression to represent constants
- Update ASan to copy metadata in the same way as I updated merge globals
- Update clang
Depends on D20074