[PATCH] D99410: [WebAssembly] Fix incorrect DW_TAG_pointer_type size in test

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 26 04:05:37 PDT 2021


arichardson created this revision.
arichardson added reviewers: sbc100, aardappel, dschuff.
Herald added subscribers: jrtc27, ecnelises, sunfish, jgravelle-google.
arichardson requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.

It should be 64 bits not 32 for wasm64-unknown-unknown. I noticed this
because this test was failing in our CHERI fork of LLVM due to a larger
.debug_abbrev section size. It turns out this happens because we add
DW_AT_byte_size for non-default pointer sizes to allow debugging our
hybrid compilation mode where we can have two different kinds of pointers.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99410

Files:
  llvm/test/MC/WebAssembly/debug-info64.ll


Index: llvm/test/MC/WebAssembly/debug-info64.ll
===================================================================
--- llvm/test/MC/WebAssembly/debug-info64.ll
+++ llvm/test/MC/WebAssembly/debug-info64.ll
@@ -275,10 +275,10 @@
 !5 = !{!0, !6}
 !6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
 !7 = distinct !DIGlobalVariable(name: "ptr2", scope: !2, file: !3, line: 5, type: !8, isLocal: false, isDefinition: true)
-!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 32)
+!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64)
 !9 = !DISubroutineType(types: !10)
 !10 = !{null}
-!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 32)
+!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 64)
 !12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
 !13 = !{i32 2, !"Dwarf Version", i32 4}
 !14 = !{i32 2, !"Debug Info Version", i32 3}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99410.333528.patch
Type: text/x-patch
Size: 927 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210326/734e1d1a/attachment.bin>


More information about the llvm-commits mailing list