To emit debuginfo for declaration of global extern variable with option "-fstandalone-debug" this patch is created. It is contain change related to llvm code and for clang code patch is available at (https://reviews.llvm.org/D71451)
Diff Detail
Event Timeline
Please fill out the 'Summary' field in the Phab review so the context is easier to pick up for reviewers.
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | ||
---|---|---|
172 | Why is a linkage name needed on a global variable declaration? Could you leave a comment that explains this? | |
173 | Please clang-format your diffs so that they conform to llvm's coding standards (https://www.llvm.org/docs/CodingStandards.html#source-code-formatting) | |
186 | How is this source change covered by your test? If not, could you please add test coverage? | |
llvm/test/DebugInfo/Generic/debug-info-extern-variable-declaration.ll | ||
31 | Could you reduce this test case by deleting unnecessary attributes? |
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | ||
---|---|---|
172 | Currently linkage is add for global variable from method addLocationAttribute ,But after this change for declaration of global variable location will be not Created,Because of that linkage name is not missing for variable "None" and "__default_lock_policy".I have analysed clang binary from that i have seen this cases.That's why i have added linkage name here. | |
173 | Updated Source code is added. | |
186 | Yes, debug-info-extern-variable-declaration.ll test case will cover this source changes. |
Why is a linkage name needed on a global variable declaration? Could you leave a comment that explains this?