Commit 1e02f1d
[lldb][SBType] GetBasicType to unwrap canonical type (llvm#149112)
`SBType::GetBasicType` fails on typedefs to primitive types. The docs
for `GetBasicType` state:
```
Returns the BasicType value that is most appropriate to this type
```
But, e.g., for `uint64_t` this would currently return
`eBasicTypeInvalid`.
`TypeSystemClang::GetBasicTypeEnumeration` (which is what
`SBType::GetBasicType` uses) doesn't see through typedefs. Inside LLDB
we almost always call `GetBasicTypeEnumeration` on the canonical type.
In the cases we don't I suspect those were just subtle bugs. This patch
gets the canonical type inside of `GetBasicTypeEnumeration` instead.
rdar://1558292081 parent 90d20ac commit 1e02f1d
File tree
6 files changed
+53
-11
lines changed- lldb
- source
- Plugins/TypeSystem/Clang
- Symbol
- ValueObject
- test/API/python_api/sbtype_basic_type
6 files changed
+53
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5460 | 5460 | | |
5461 | 5461 | | |
5462 | 5462 | | |
5463 | | - | |
| 5463 | + | |
5464 | 5464 | | |
5465 | 5465 | | |
5466 | 5466 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
358 | | - | |
| 357 | + | |
359 | 358 | | |
360 | 359 | | |
361 | 360 | | |
362 | | - | |
| 361 | + | |
363 | 362 | | |
364 | 363 | | |
365 | 364 | | |
| |||
379 | 378 | | |
380 | 379 | | |
381 | 380 | | |
382 | | - | |
| 381 | + | |
383 | 382 | | |
384 | 383 | | |
385 | 384 | | |
| |||
455 | 454 | | |
456 | 455 | | |
457 | 456 | | |
458 | | - | |
459 | | - | |
| 457 | + | |
460 | 458 | | |
461 | 459 | | |
462 | 460 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3228 | 3228 | | |
3229 | 3229 | | |
3230 | 3230 | | |
3231 | | - | |
3232 | | - | |
| 3231 | + | |
| 3232 | + | |
3233 | 3233 | | |
3234 | 3234 | | |
3235 | 3235 | | |
| |||
3245 | 3245 | | |
3246 | 3246 | | |
3247 | 3247 | | |
3248 | | - | |
| 3248 | + | |
3249 | 3249 | | |
3250 | 3250 | | |
3251 | 3251 | | |
| |||
3261 | 3261 | | |
3262 | 3262 | | |
3263 | 3263 | | |
3264 | | - | |
| 3264 | + | |
3265 | 3265 | | |
3266 | 3266 | | |
3267 | 3267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments