[PATCH] D99900: [llvm] [testsuite] Fix invalid DW_AT_location DWARF expression in unattached-global.ll
Jan Kratochvil via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 5 14:41:28 PDT 2021
jankratochvil created this revision.
jankratochvil added a reviewer: aprantl.
jankratochvil added a project: LLVM.
jankratochvil requested review of this revision.
I had a problem in unrelated D99850 <https://reviews.llvm.org/D99850> with this testcase. IMO `unattached-global.ll` is wrong (since its inception in D20147 <https://reviews.llvm.org/D20147>):
!4 = !DIExpression(DW_OP_plus_uconst, 4)
DW_AT_location (DW_OP_plus_uconst 0x4)
That is not a valid DWARF expression for `DW_TAG_variable`. There should be an empty DWARF expression (or completely missing `DW_AT_location`).
In D99850#2668467 <https://reviews.llvm.org/D99850#2668467>, @dblaikie wrote:
> Probably good to cleanup that test in a separate preparatory commit. & maybe you or @aprantl might be interested in suring up the LLVM IR debug info verifier to catch this?
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D99900
Files:
llvm/test/DebugInfo/X86/unattached-global.ll
Index: llvm/test/DebugInfo/X86/unattached-global.ll
===================================================================
--- llvm/test/DebugInfo/X86/unattached-global.ll
+++ llvm/test/DebugInfo/X86/unattached-global.ll
@@ -12,7 +12,7 @@
!1 = !{!2}
!2 = !DIGlobalVariableExpression(var: !3, expr: !4)
!3 = distinct !DIGlobalVariable(name: "a", scope: null, isLocal: false, isDefinition: true, type: !6)
-!4 = !DIExpression(DW_OP_plus_uconst, 4)
+!4 = !DIExpression()
!5 = !DIFile(filename: "<stdin>", directory: "/")
!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99900.335330.patch
Type: text/x-patch
Size: 599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210405/81e89752/attachment.bin>
More information about the llvm-commits
mailing list