Commit 6bfe37f
committed
[CIR] Avoid unnecessary type cache clearing with Enum type completion
When we process a completed Enum type, we were checking to see if the type
was in the type cache and clearing the cache if the mapped type for the
enum didn't pass an isInteger(32) check. Unfortunately, this checks to
see if the type is the MLIR builtin 32-bit integer type, whereas the
type we actually use as a default for forward-declared enums is a CIR
integer type, so the check always failed.
I don't believe there can ever be a case where the forward declared type
for the enum doesn't match the completed type, so we should never need
to clear the cache. This change replaces the previous check with an
assert that compares the actual completed type to the cached type.1 parent 26b1332 commit 6bfe37f
1 file changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
821 | 821 | | |
822 | 822 | | |
823 | 823 | | |
| |||
0 commit comments