This changes introduces llvm.asan.globals metadata, which can be
used by the frontend to provide additional information about the LLVM
global variables, namely:
- source location (file/line/column) of corresponding globals in the user code.
These locations will be available at runtime, and will be printed in the
error report if needed, even if the binary is built without debug info.
- whether global is dynamically initialized. This replaces
llvm.asan.dynamically_initialized_globals metadata used to detect init-order bugs.
- whether the global is blacklisted. This is a first step to move all blacklist
functionality to the frontend.
Note: This is an ABI-breaking change. All users of ASan runtime library will have
to emit new layout of __asan_global structure (now it has one more field).
If you're OK with this change, I will commit it with extra ASan output tests,
checking that we're actually reporting source locations for global variables,
function-static variables and simple string literals.
can this be done with a single lookup to SourceLocation and only if DN->getOperand(1) is non-zero?