[PATCH] D126835: Round up zero-sized symbols to 1 byte in `.debug_aranges` (without breaking other logic).

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 2 12:51:29 PDT 2022


bjope added inline comments.


================
Comment at: llvm/test/CodeGen/X86/dwarf-aranges-zero-size.ll:18
+!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+!1 = distinct !DIGlobalVariable(name: "EXAMPLE", linkageName: "EXAMPLE", scope: null, file: null, line: 161, type: !2, isLocal: false, isDefinition: true, align: 1)
+!2 = !DIBasicType(name: "()", encoding: DW_ATE_unsigned)
----------------
As mentioned in comments in the earlier review, "align" is specified in bits. And aligning to 1 bit seem a bit weird (downstream this trigger and assertion for us, because we assert that align is a multiple of the char size since llvm will divide this by the char size to get alignment in bytes).
Is rust really using alignments smaller than the char size?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126835/new/

https://reviews.llvm.org/D126835



More information about the llvm-commits mailing list