Commit c180da9
authored
[APInt] Fix getAllOnes() with zero width (#112227)
This makes sure that APInt::getAllOnes() keeps working after the APInt
constructor assertions are enabled.
I'm relaxing the requirement for the signed case to either an all zeros
or all ones integer. This is basically saying that we can interpret the
zero-width integer as either positive or negative.1 parent 708b154 commit c180da9
2 files changed
+15
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
120 | 123 | | |
121 | | - | |
122 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3423 | 3423 | | |
3424 | 3424 | | |
3425 | 3425 | | |
| 3426 | + | |
3426 | 3427 | | |
3427 | 3428 | | |
3428 | 3429 | | |
| |||
0 commit comments