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

Ellis Hoag via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 13 11:55:47 PDT 2021


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 <https://reviews.llvm.org/D108492> 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_var", scope: !6, file: !5, line: 3, type: !10, isLocal: false, isDefinition: true)

But maybe we can fix this in another diff?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109703/new/

https://reviews.llvm.org/D109703



More information about the cfe-commits mailing list