Commit 42e2280
Clean up singleton TypeId use (#6300)
#6289 absentmindedly added fields in more places, and this is undoing
that plus further fixes.
This does some cleanup of types with relation to singletons. For
`TypeType` and `ErrorInst`, they're always complete due to a
`SetComplete` call in `file.cpp`. For `CppVoidType`, it's intended to be
incomplete by construction, and so a `TypeId` should be okay. The intent
though on not generally providing these had been that `GetSingletonType`
needs to be called to get a type to be marked as complete.
In the case of `AutoType`, removing `TypeId`does change a small printing
detail. I think that's old legacy that's just been carried forward.
Otherwise, for both `InstType` and `AutoType`, I've added
`GetSingletonType` calls where they were used in order to ensure
completeness is applied correctly. These calls cause small SemIR
permutations.
This causes `AutoType` to be seen by lowering, so I'm adding a
placeholder for it. Also merging two functions that look like they're
identical in intent -- not sure why they're separate.
---------
Co-authored-by: Dana Jansens <[email protected]>1 parent f272198 commit 42e2280
File tree
47 files changed
+215
-210
lines changed- toolchain
- check
- testdata
- basics/raw_sem_ir
- class
- generic
- deduce
- facet
- for
- function/generic
- generic/template
- impl
- lookup
- interface
- interop/cpp
- class
- function
- operators/overloaded
- packages
- where_expr
- docs
- lower
- sem_ir
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
47 files changed
+215
-210
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | | - | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1459 | 1459 | | |
1460 | 1460 | | |
1461 | 1461 | | |
1462 | | - | |
1463 | | - | |
1464 | | - | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
1465 | 1466 | | |
1466 | 1467 | | |
1467 | 1468 | | |
| |||
1735 | 1736 | | |
1736 | 1737 | | |
1737 | 1738 | | |
1738 | | - | |
| 1739 | + | |
1739 | 1740 | | |
1740 | 1741 | | |
1741 | 1742 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
987 | 987 | | |
988 | 988 | | |
989 | 989 | | |
990 | | - | |
991 | | - | |
992 | | - | |
993 | | - | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
994 | 993 | | |
995 | 994 | | |
996 | 995 | | |
| |||
1002 | 1001 | | |
1003 | 1002 | | |
1004 | 1003 | | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
1008 | | - | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
1009 | 1007 | | |
1010 | 1008 | | |
1011 | 1009 | | |
| |||
2085 | 2083 | | |
2086 | 2084 | | |
2087 | 2085 | | |
2088 | | - | |
2089 | | - | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
2090 | 2090 | | |
2091 | 2091 | | |
2092 | 2092 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
| 415 | + | |
| 416 | + | |
416 | 417 | | |
417 | 418 | | |
418 | 419 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
464 | | - | |
| 464 | + | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
470 | | - | |
| 470 | + | |
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
| |||
0 commit comments