probinson added a comment. In D103131#2780997 <https://reviews.llvm.org/D103131#2780997>, @dblaikie wrote:
> Looks like GCC emits aliases as a `DW_TAG_variable` without a location, not > as a `DW_TAG_imported_declaration` and marks it external; this works only because gdb will look up the ELF symbol when you say `p newname`. I've known debuggers that wouldn't do that. I think the `DW_TAG_imported_declaration` is making fewer assumptions about debugger behavior. ================ Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:4954 + llvm::DIScope *DContext = getDeclContextDescriptor(D); + if (llvm::DINode *Target = getDeclarationOrDefinition(D)) { + auto Loc = D->getLocation(); ---------------- The variables Unit and DContext are used only inside the `if` so I would put those two variables inside the `if` as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103131/new/ https://reviews.llvm.org/D103131 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits