[PATCH] D108492: [DebugInfo] Place static variable DIEs under the correct parent

Ellis Hoag via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 20 15:16:19 PDT 2021


ellis created this revision.
Herald added subscribers: hiraditya, nemanjai.
ellis added a reviewer: dblaikie.
ellis added a project: debug-info.
ellis published this revision for review.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

If a static variable (which is also a global variable) is defined in a function that is inlined and removed, then the concrete DIE of the function will not be created and the variable's DIE won't have the correct parent. Instead, we delay assigning the parent DIE until we are sure the function's DIE was created.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108492

Files:
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll
  llvm/test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll
  llvm/test/DebugInfo/Generic/static-var-inlined.ll
  llvm/test/DebugInfo/PowerPC/strict-dwarf.ll
  llvm/test/DebugInfo/X86/gnu-public-names.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108492.367916.patch
Type: text/x-patch
Size: 16372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210820/7fdd0698/attachment-0001.bin>


More information about the llvm-commits mailing list