Jubilee
864eba9fb1
Rollup merge of #136895 - maurer:fix-enum-discr, r=nikic
...
debuginfo: Set bitwidth appropriately in enum variant tags
Previously, we unconditionally set the bitwidth to 128-bits, the largest an enum would possibly be. Then, LLVM would cut down the constant by chopping off leading zeroes before emitting the DWARF. LLVM only supported 64-bit enumerators, so this would also have occasionally resulted in truncated data.
LLVM added support for 128-bit enumerators in llvm/llvm-project#125578
That patchset trusts the constant to describe how wide the variant tag is, so the high 64-bits of zeros are considered potentially load-bearing.
As a result, we went from emitting tags that looked like:
DW_AT_discr_value (0xfe)
(because `dwarf::BestForm` selected `data1`)
to emitting tags that looked like:
DW_AT_discr_value (<0x10> fe ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 )
This makes the `DW_AT_discr_value` encode at the bitwidth of the tag, which:
1. Is probably closer to our intentions in terms of describing the data.
2. Doesn't invoke the 128-bit support which may not be supported by all debuggers / downstream tools.
3. Will result in smaller debug information.
2025-02-13 17:46:08 -08:00
..
2025-02-12 20:09:58 -05:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2024-12-15 19:01:45 +08:00
2024-10-06 18:12:25 +02:00
2024-10-31 18:20:11 +08:00
2025-02-11 13:41:35 -08:00
2024-12-19 20:36:51 +08:00
2024-11-27 07:18:25 -08:00
2024-05-31 15:56:43 +10:00
2025-02-13 17:46:08 -08:00
2025-01-28 19:10:24 +03:00
2025-02-11 13:41:35 -08:00
2024-12-11 21:34:48 +11:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-12-19 20:36:51 +08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2024-06-25 19:00:02 +02:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-11-23 20:19:51 +08:00
2025-02-11 13:41:35 -08:00
2025-01-27 15:11:59 +01:00
2024-06-19 13:54:55 +01:00
2024-11-25 15:30:35 +01:00
2024-08-07 14:08:34 +02:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-01-12 13:32:36 +01:00
2024-05-31 15:56:43 +10:00
2025-01-30 11:22:46 +01:00
2024-05-31 15:56:43 +10:00
2024-06-19 13:54:55 +01:00
2024-09-09 19:39:43 -07:00
2024-09-18 12:28:55 -07:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-10 21:38:44 +01:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-08-10 10:44:24 +08:00
2024-04-11 21:42:35 -04:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-04-11 17:20:08 +00:00
2024-12-13 00:04:56 +00:00
2024-12-19 20:36:51 +08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-10 01:35:22 -05:00
2024-05-31 15:56:43 +10:00
2025-01-31 22:29:08 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2024-11-14 17:44:54 +08:00
2024-10-31 11:59:17 +00:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-07-25 15:14:42 -04:00
2024-05-31 15:56:43 +10:00
2024-08-07 14:08:34 +02:00
2025-02-11 13:41:35 -08:00
2024-10-23 04:42:03 +02:00
2024-04-24 13:12:33 +01:00
2025-02-11 13:41:35 -08:00
2024-09-09 19:39:43 -07:00
2024-09-21 01:07:00 -04:00
2024-06-04 01:30:51 -07:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-03 10:39:32 -05:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2024-12-19 20:36:51 +08:00
2025-02-11 13:41:35 -08:00
2024-12-19 20:36:51 +08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-08-07 14:08:34 +02:00
2024-10-11 08:43:27 +11:00
2024-06-05 15:40:11 +00:00
2025-02-11 13:41:26 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2024-05-03 14:32:08 +02:00
2024-05-31 15:56:43 +10:00
2024-06-23 00:40:43 -07:00
2025-02-03 10:39:32 -05:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2024-09-25 15:53:53 +02:00
2025-01-21 06:59:15 -07:00
2024-07-14 13:48:29 +03:00
2024-12-15 19:01:45 +08:00
2025-01-16 00:26:55 +01:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-01-27 12:12:59 +00:00
2024-03-22 09:55:50 -04:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2024-08-12 19:20:00 -07:00
2024-11-14 17:44:54 +08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2024-09-18 13:53:31 -07:00
2024-10-16 18:38:26 +00:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-07-14 13:48:29 +03:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-12-10 01:29:43 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-01-10 22:53:54 +01:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-12-10 21:41:05 +01:00
2024-09-21 01:07:00 -04:00
2024-05-31 15:56:43 +10:00
2024-04-04 21:59:08 +01:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2024-07-14 13:48:29 +03:00
2025-02-11 13:41:35 -08:00
2025-01-23 17:19:53 +00:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-01-21 08:22:15 +00:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-12-04 16:16:24 +00:00
2025-02-11 13:41:35 -08:00
2024-06-14 13:31:46 +10:00
2024-06-14 13:31:46 +10:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-10-17 02:07:02 +01:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-01-21 08:27:30 +00:00
2024-11-06 02:22:00 -05:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2024-05-31 15:56:43 +10:00
2024-08-07 00:41:48 -04:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-01-27 23:44:47 +01:00
2025-01-28 04:40:42 +01:00
2025-02-06 18:21:13 +03:00
2025-02-11 13:41:35 -08:00
2025-01-28 04:40:42 +01:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-10-23 04:42:03 +02:00
2025-02-11 13:41:35 -08:00
2024-05-31 15:56:43 +10:00
2024-10-19 13:09:21 +00:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2024-06-19 13:54:55 +01:00
2024-06-19 13:54:55 +01:00
2024-06-19 13:54:55 +01:00
2024-09-18 13:53:31 -07:00
2024-09-18 13:53:31 -07:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-11 13:41:35 -08:00
2025-02-06 23:44:23 +01:00
2025-01-28 19:10:26 +03:00
2025-02-11 13:41:35 -08:00
2024-09-09 19:39:43 -07:00