commit | 39fba0e3a081a0ccd41086df4c1120b13e6b1efb | [log] [tgz] |
---|---|---|
author | Kristina Bessonova <kbessonova@accesssoftek.com> | Mon Dec 06 12:19:09 2021 +0200 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Dec 06 02:26:27 2021 -0800 |
tree | 5175a2a13a5a1f0fbf2910581cee6db4399bbd7d | |
parent | 485aed52434a3af6f8dfa4adc80e785c573e9fa2 [diff] |
[clang][DebugInfo] Allow function-local statics and types to be scoped within a lexical block This is almost a reincarnation of https://reviews.llvm.org/D15977 originally implemented by Amjad Aboud. It was discussed on llvm-dev [0], committed with its backend counterpart [1], but finally reverted [2]. This patch makes clang to emit debug info for function-local static variables, records (classes, structs and unions) and typdefs correctly scoped if those function-local entites defined within a lexical (bracketed) block. Before this patch, clang emits all those entities directly scoped in DISubprogram no matter where they were really defined, causing debug info loss (reported several times in [3], [4], [5]). [0] https://lists.llvm.org/pipermail/llvm-dev/2015-November/092551.html [1] https://reviews.llvm.org/rG30e7a8f694a19553f64b3a3a5de81ce317b9ec2f [2] https://reviews.llvm.org/rGdc4531e552af6c880a69d226d3666756198fbdc8 [3] https://bugs.llvm.org/show_bug.cgi?id=19238 [4] https://bugs.llvm.org/show_bug.cgi?id=23164 [5] https://bugs.llvm.org/show_bug.cgi?id=44695 Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D113743 GitOrigin-RevId: e403f4fdc88322201040f2bee7b328e8a78e2f7f