Commit 656309b
[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://155829208
(cherry picked from commit b7889a6)1 parent e43c5de commit 656309b
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 | |
|---|---|---|---|
| |||
5604 | 5604 | | |
5605 | 5605 | | |
5606 | 5606 | | |
5607 | | - | |
| 5607 | + | |
5608 | 5608 | | |
5609 | 5609 | | |
5610 | 5610 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
374 | | - | |
| 373 | + | |
375 | 374 | | |
376 | 375 | | |
377 | 376 | | |
378 | | - | |
| 377 | + | |
379 | 378 | | |
380 | 379 | | |
381 | 380 | | |
| |||
395 | 394 | | |
396 | 395 | | |
397 | 396 | | |
398 | | - | |
| 397 | + | |
399 | 398 | | |
400 | 399 | | |
401 | 400 | | |
| |||
471 | 470 | | |
472 | 471 | | |
473 | 472 | | |
474 | | - | |
475 | | - | |
| 473 | + | |
476 | 474 | | |
477 | 475 | | |
478 | 476 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3296 | 3296 | | |
3297 | 3297 | | |
3298 | 3298 | | |
3299 | | - | |
3300 | | - | |
| 3299 | + | |
| 3300 | + | |
3301 | 3301 | | |
3302 | 3302 | | |
3303 | 3303 | | |
| |||
3313 | 3313 | | |
3314 | 3314 | | |
3315 | 3315 | | |
3316 | | - | |
| 3316 | + | |
3317 | 3317 | | |
3318 | 3318 | | |
3319 | 3319 | | |
| |||
3329 | 3329 | | |
3330 | 3330 | | |
3331 | 3331 | | |
3332 | | - | |
| 3332 | + | |
3333 | 3333 | | |
3334 | 3334 | | |
3335 | 3335 | | |
| |||
| 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