Commit ebd0b1f
authored
Merge pull request swiftlang#11747 from swiftlang/bitint-debug-info-to-21.x
π [lldb][TypeSystem] Better support for _BitInt types
This patch ensures we make use of the `DW_AT_bit_size` on
`DW_TAG_base_type`s and adjusts `TypeSystemClang` to recognize `_BitInt`.
For DWARF from older versions of Clang that didn't emit a
`DW_AT_bit_size`, we would create `_BitInt`s using the byte-size. Not
sure we can do much better than that. But the situation beforehand
wasn't much better.
Before:
```
(lldb) v
(char) a = '\x01'
(unsigned char) b = '\x01'
(long) c = 2
(unsigned long) d = 2
```
After:
```
(lldb) v
(_BitInt(2)) a = 1
(unsigned _BitInt(2)) b = 1
(_BitInt(52)) c = 2
(unsigned _BitInt(52)) d = 2
```
(cherry picked from commit swiftlang@deb54ba)File tree
32 files changed
+620
-109
lines changed- clang
- lib/CodeGen
- test/CodeGen
- lldb
- include/lldb/Symbol
- source
- Plugins
- SymbolFile/DWARF
- TypeSystem
- Clang
- Swift
- Symbol
- ValueObject
- unittests
- SymbolFile/DWARF
- Symbol
- llvm
- include/llvm/IR
- lib
- AsmParser
- Bitcode
- Reader
- Writer
- CodeGen/AsmPrinter
- IR
- test
- Bitcode
- DebugInfo
- X86
32 files changed
+620
-109
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1146 | 1146 | | |
1147 | 1147 | | |
1148 | 1148 | | |
1149 | | - | |
1150 | | - | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
1151 | 1153 | | |
1152 | 1154 | | |
1153 | 1155 | | |
1154 | | - | |
1155 | 1156 | | |
1156 | | - | |
| 1157 | + | |
| 1158 | + | |
1157 | 1159 | | |
1158 | 1160 | | |
1159 | 1161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | | - | |
| 436 | + | |
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
510 | | - | |
| 510 | + | |
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
353 | | - | |
| 352 | + | |
354 | 353 | | |
355 | 354 | | |
356 | 355 | | |
| |||
Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
468 | 472 | | |
469 | 473 | | |
470 | 474 | | |
| |||
839 | 843 | | |
840 | 844 | | |
841 | 845 | | |
842 | | - | |
| 846 | + | |
843 | 847 | | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
844 | 854 | | |
845 | | - | |
846 | | - | |
| 855 | + | |
847 | 856 | | |
848 | | - | |
| 857 | + | |
849 | 858 | | |
850 | 859 | | |
851 | 860 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| 595 | + | |
595 | 596 | | |
596 | 597 | | |
597 | 598 | | |
| |||
Lines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
987 | 987 | | |
988 | 988 | | |
989 | 989 | | |
| 990 | + | |
| 991 | + | |
990 | 992 | | |
991 | 993 | | |
992 | 994 | | |
| |||
1043 | 1045 | | |
1044 | 1046 | | |
1045 | 1047 | | |
| 1048 | + | |
| 1049 | + | |
1046 | 1050 | | |
1047 | 1051 | | |
1048 | 1052 | | |
| |||
3925 | 3929 | | |
3926 | 3930 | | |
3927 | 3931 | | |
| 3932 | + | |
| 3933 | + | |
| 3934 | + | |
| 3935 | + | |
| 3936 | + | |
| 3937 | + | |
| 3938 | + | |
3928 | 3939 | | |
3929 | 3940 | | |
3930 | 3941 | | |
| |||
4955 | 4966 | | |
4956 | 4967 | | |
4957 | 4968 | | |
4958 | | - | |
4959 | | - | |
| 4969 | + | |
4960 | 4970 | | |
4961 | 4971 | | |
4962 | 4972 | | |
4963 | | - | |
4964 | 4973 | | |
4965 | 4974 | | |
4966 | 4975 | | |
| |||
4996 | 5005 | | |
4997 | 5006 | | |
4998 | 5007 | | |
4999 | | - | |
5000 | 5008 | | |
5001 | 5009 | | |
5002 | 5010 | | |
| |||
5196 | 5204 | | |
5197 | 5205 | | |
5198 | 5206 | | |
5199 | | - | |
| 5207 | + | |
5200 | 5208 | | |
5201 | 5209 | | |
5202 | 5210 | | |
5203 | | - | |
5204 | 5211 | | |
5205 | 5212 | | |
5206 | 5213 | | |
| |||
5256 | 5263 | | |
5257 | 5264 | | |
5258 | 5265 | | |
5259 | | - | |
| 5266 | + | |
5260 | 5267 | | |
5261 | 5268 | | |
5262 | 5269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
907 | 907 | | |
908 | 908 | | |
909 | 909 | | |
910 | | - | |
911 | | - | |
| 910 | + | |
912 | 911 | | |
913 | 912 | | |
914 | 913 | | |
| |||
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6775 | 6775 | | |
6776 | 6776 | | |
6777 | 6777 | | |
6778 | | - | |
6779 | | - | |
| 6778 | + | |
6780 | 6779 | | |
6781 | 6780 | | |
6782 | | - | |
6783 | 6781 | | |
6784 | 6782 | | |
6785 | 6783 | | |
| |||
6842 | 6840 | | |
6843 | 6841 | | |
6844 | 6842 | | |
6845 | | - | |
| 6843 | + | |
6846 | 6844 | | |
6847 | 6845 | | |
6848 | 6846 | | |
| |||
6877 | 6875 | | |
6878 | 6876 | | |
6879 | 6877 | | |
6880 | | - | |
6881 | 6878 | | |
6882 | 6879 | | |
6883 | 6880 | | |
| |||
0 commit comments