The current metadata is instruction-level-only. We also should generate metadata for globals and for function parameters (and possibly return values). This will require a level of indirection since LLVM doesn't let you associate metadata directly with a global. This can work more or less how debug information for globals and functions already works: a single, module-global map from names to metadata.
The current metadata is instruction-level-only. We also should generate metadata for globals and for function parameters (and possibly return values). This will require a level of indirection since LLVM doesn't let you associate metadata directly with a global. This can work more or less how debug information for globals and functions already works: a single, module-global map from names to metadata.