Unnamed repository; edit this file 'description' to name the repository.
Rollup merge of #157289 - Walnut356:msvc_template_args, r=jieyouxu
Add infallible primitive type lookups to template arg resolver Fixes a regression that seem to come from LLDB 22 where looking up primitive types by name on MSVC no longer works. Container types use type name lookups to resolve generics, so it causes container types (e.g. `Vec<i32>`) to fail to create their child values. Before: ``` (lldb) v vec_v (alloc::vec::Vec<i32,alloc::alloc::Global>) vec_v = size=5 {} (lldb) v vec_v[0] error: <user expression 0>:1:6: array index 0 is not valid for "(Vec<i32,alloc::alloc::Global>) vec_v" 1 | vec_v[0] | ^ ``` After: ``` (lldb) v vec_v (alloc::vec::Vec<i32,alloc::alloc::Global>) vec_v = size=5 { [0] = 10 [1] = 20 [2] = 30 [3] = 40 [4] = 50 } (lldb) v vec_v[0] (long) vec_v[0] = 10 ``` This patch maps the type name to its `eBasicType` equivalent (i.e. the LLDB enum for primitive types) and looks up the type based on that. AFAIK, `eBasicType` lookups are 100% infallible. Even if the primitive type somehow isn't in the debug info, `TypeSystemClang` will invent the appropriate `SBType` object for it. This isn't a major blocker for the test suite rework, but it does prevent me from blessing tests with container types on MSVC unless I downgrade to LLDB 21. r? @jieyouxu, @Kobzol
Jacob Pratt 6 weeks ago
parent fcf8053 · parent d62283f · commit 3c47508
0 files changed, 0 insertions, 0 deletions