Jordan Rupprecht
3c51ea3619
[DataFormatter] Fix variant npos with _LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION enabled.
...
This data formatter should print "No Value" if a variant is unset. It does so by checking if `__index` has a value of `-1`, however it does so by interpreting it as a signed int.
By default, `__index` has type `unsigned int`. When `_LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION` is enabled, the type of `__index` is either `unsigned char`, `unsigned short`, or `unsigned int`, depending on how many fields there are -- as small as possible. For example, when `std::variant` has only a few types, the index type is `unsigned char`, and the npos value will be interpreted by LLDB as `255` when it should be `-1`.
This change does not special case the variant optimization; it just reads the type instead of assuming it's `unsigned int`.
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D138892
2022-11-30 13:20:13 -08:00
..
2022-06-17 14:34:49 -07:00
2022-09-12 13:59:05 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-11-11 17:03:02 -08:00
2022-09-26 11:26:13 -07:00
2022-08-15 08:54:06 +00:00
2022-11-30 13:20:13 -08:00
2022-06-17 14:34:49 -07:00
2022-08-03 15:44:19 +02:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-07-23 15:37:26 -07:00
2022-11-11 17:03:02 -08:00
2022-06-17 14:34:49 -07:00
2022-06-20 12:59:31 +02:00
2022-06-17 14:34:49 -07:00
2022-08-15 08:54:06 +00:00
2022-11-11 17:03:02 -08:00
2022-06-17 14:34:49 -07:00
2022-11-25 11:55:41 +01:00
2022-06-17 14:34:49 -07:00
2022-08-15 08:54:06 +00:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-08-02 16:59:12 +05:00
2022-08-11 19:11:01 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-11-23 10:07:12 -08:00
2022-07-07 15:06:40 +02:00
2022-06-17 14:34:49 -07:00
2022-09-13 10:38:38 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-09-13 10:38:38 -07:00
2022-09-23 12:32:38 +00:00
2022-09-13 10:38:38 -07:00
2022-08-03 11:44:13 -07:00
2022-08-15 08:54:06 +00:00
2022-09-27 16:20:26 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-11-13 14:21:55 -08:00
2022-03-02 22:35:34 -08:00
2022-06-17 14:34:49 -07:00
2022-11-17 08:17:10 -08:00
2022-06-17 14:34:49 -07:00
2022-11-21 12:45:27 -08:00
2022-08-11 19:11:01 -07:00
2022-11-03 14:44:53 -07:00
2022-08-03 11:44:13 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-11-11 17:03:02 -08:00
2022-06-17 14:34:49 -07:00
2022-08-03 11:44:13 -07:00
2022-11-18 13:56:48 -08:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-08-04 09:19:55 -07:00
2022-09-11 20:50:03 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-11-11 17:03:02 -08:00
2022-10-21 14:00:50 +01:00
2022-06-17 14:34:49 -07:00
2022-08-03 11:44:13 -07:00
2022-10-27 08:41:00 -07:00
2022-11-21 13:26:01 +01:00
2022-08-15 08:54:06 +00:00
2022-06-17 14:34:49 -07:00
2022-08-11 19:11:01 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-08-15 08:54:06 +00:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-10-04 11:38:32 -07:00
2022-08-25 08:49:13 +01:00
2022-08-15 08:54:06 +00:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00
2022-06-17 14:34:49 -07:00