llvm-project
llvm-project copied to clipboard
[clang][DebugInfo] Missing debug info for alias of variable declared later in the scope
Consider the example:
extern int newname __attribute__((alias("oldname")));
int oldname = 1;
No debug info would be generated for newname in this case as the aliasee oldname is declared later.
Fix compiler to generate newname as DW_TAG_imported_declaration pointing to the DIE of oldname.
Refer https://reviews.llvm.org/D120989 (Support for generating debug info for alias variables).
@llvm/issue-subscribers-debuginfo
@llvm/issue-subscribers-clang-codegen