Commit 2a923d7
committed
[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 367909f commit 2a923d7
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 | |
|---|---|---|---|
| |||
5701 | 5701 | | |
5702 | 5702 | | |
5703 | 5703 | | |
5704 | | - | |
| 5704 | + | |
5705 | 5705 | | |
5706 | 5706 | | |
5707 | 5707 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
3389 | 3389 | | |
3390 | 3390 | | |
3391 | 3391 | | |
3392 | | - | |
3393 | | - | |
| 3392 | + | |
| 3393 | + | |
3394 | 3394 | | |
3395 | 3395 | | |
3396 | 3396 | | |
| |||
3405 | 3405 | | |
3406 | 3406 | | |
3407 | 3407 | | |
3408 | | - | |
| 3408 | + | |
3409 | 3409 | | |
3410 | 3410 | | |
3411 | 3411 | | |
| |||
3420 | 3420 | | |
3421 | 3421 | | |
3422 | 3422 | | |
3423 | | - | |
| 3423 | + | |
3424 | 3424 | | |
3425 | 3425 | | |
3426 | 3426 | | |
| |||
| 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