llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[clang][DebugInfo] Missing debug info for alias of variable declared later in the scope

Open kavitha-natarajan opened this issue 4 years ago • 2 comments

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).

kavitha-natarajan avatar Jun 13 '22 13:06 kavitha-natarajan

@llvm/issue-subscribers-debuginfo

llvmbot avatar Jun 13 '22 14:06 llvmbot

@llvm/issue-subscribers-clang-codegen

llvmbot avatar Jun 13 '22 14:06 llvmbot