mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 10:16:07 +00:00

- [DebugMetadata][DwarfDebug] Support function-local types in lexical block scopes (4/7) - [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions This is a follow-up for https://reviews.llvm.org/D144006, fixing a crash reported in Chromium (https://reviews.llvm.org/D144006#4651955). The first commit is added for convenience, as it has already been accepted. If DISubpogram was not cloned (e.g. we are cloning a function that has other functions inlined into it, and subprograms of the inlined functions are not supposed to be cloned), it doesn't make sense to clone its DILocalVariables as well. Otherwise get duplicated DILocalVariables not tracked in their subprogram's retainedNodes, that crash LTO with Chromium. This is meant to be committed along with https://reviews.llvm.org/D144006.