Add the range statement to the constant resolver#612
Conversation
Codecov ReportBase: 93.66% // Head: 93.67% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@ ## master #612 +/- ## ========================================== + Coverage 93.66% 93.67% +0.01% ========================================== Files 44 44 Lines 16804 16815 +11 ========================================== + Hits 15740 15752 +12 + Misses 1064 1063 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
…validation-in-case
riederm left a comment
There was a problem hiding this comment.
I dont believe that ranges will work that easily
we would need to unroll it like:
case (3..10) --> needs to become case 3,4,5,6,7,8,9,10 or we need to rewrite the switch-statement to if-elseif-elseif-...-else
| %DAYS_IN_MONTH = getelementptr inbounds %main, %main* %0, i32 0, i32 0 | ||
| %SIXTY = getelementptr inbounds %main, %main* %0, i32 0, i32 1 | ||
| %load_DAYS_IN_MONTH = load i32, i32* %DAYS_IN_MONTH, align 4 | ||
| switch i32 %load_DAYS_IN_MONTH, label %else [ |
There was a problem hiding this comment.
does this look correct? this switch does nothing but else, right?
There was a problem hiding this comment.
I also thought this was strange, I can add a correctness test with the constants, but we do have some that take care of the range
This commit is only making sure the constants in the ranges are resolved. |
riederm left a comment
There was a problem hiding this comment.
yep I didnt look into the else thoroughly
Fixes #591