[PATCH] D109703: [DebugInfo] Fix scope for local static variables

2021-11-15 Thread Kristina Bessonova via Phabricator via cfe-commits
krisb abandoned this revision. krisb added a comment. Abandon in favor of https://reviews.llvm.org/D113741. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109703/new/ https://reviews.llvm.org/D109703 ___

[PATCH] D109703: [DebugInfo] Fix scope for local static variables

2021-09-30 Thread Kristina Bessonova via Phabricator via cfe-commits
krisb added a comment. @ellis I'd appreciate if you go ahead and fix the issues with inlined functions. Sorry for interrupting you in D108492 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109703/new/ https://re

[PATCH] D109703: [DebugInfo] Fix scope for local static variables

2021-09-28 Thread Ellis Hoag via Phabricator via cfe-commits
ellis added a comment. In D109703#3018935 , @krisb wrote: > @dblaikie yeah, the problem(s) seemed easier and smaller :( > > Basically, we have two issues with local scopes here: > (1) function-scoped entities like static variables, type > definitions/typ

[PATCH] D109703: [DebugInfo] Fix scope for local static variables

2021-09-23 Thread Kristina Bessonova via Phabricator via cfe-commits
krisb added a comment. @dblaikie yeah, the problem(s) seemed easier and smaller :( Basically, we have two issues with local scopes here: (1) function-scoped entities like static variables, type definitions/typedefs, etc have incorrect (empty) parent DIE if the function containing them was inlin

[PATCH] D109703: [DebugInfo] Fix scope for local static variables

2021-09-23 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. There have been a few different patches going around related to mis-scoped things - imported entities and types, maybe other things too? (static variables? Or has that already been fixed now) Perhaps some summary of the state of all these patches sent to llvm-dev/linke

[PATCH] D109703: [DebugInfo] Fix scope for local static variables

2021-09-22 Thread Ellis Hoag via Phabricator via cfe-commits
ellis added a comment. In D109703#2998350 , @krisb wrote: > But it seems imported declarations are broken not just for static locals, but > for all inlined entities, for example > > namespace ns { > inline __attribute__((always_inline)) > int foo()

[PATCH] D109703: [DebugInfo] Fix scope for local static variables

2021-09-13 Thread Ellis Hoag via Phabricator via cfe-commits
ellis added a comment. In D109703#2998350 , @krisb wrote: > In D109703#2998155 , @ellis wrote: > >> I've added this to the added test case. >> >> !18 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope:

[PATCH] D109703: [DebugInfo] Fix scope for local static variables

2021-09-13 Thread Kristina Bessonova via Phabricator via cfe-commits
krisb added a comment. In D109703#2998155 , @ellis wrote: > I've added this to the added test case. > > !18 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !4, > entity: !19, line: 122) > !19 = !DIGlobalVariable(name: "imported_static_va

[PATCH] D109703: [DebugInfo] Fix scope for local static variables

2021-09-13 Thread Ellis Hoag via Phabricator via cfe-commits
ellis added a comment. Thanks for working on this! `getOrCreateGlobalVariableDIE()` is also called in `constructImportedEntityDIE()` which means that there could be some globals without DIE parents. In D108492 I've added this to the added test case. !18 = !

[PATCH] D109703: [DebugInfo] Fix scope for local static variables

2021-09-13 Thread Kristina Bessonova via Phabricator via cfe-commits
krisb created this revision. krisb added reviewers: dblaikie, probinson. Herald added a subscriber: hiraditya. krisb requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This fixes https://bugs.llvm.org/show_bug.cgi?id=44695 (a