Commit c0a6f7a
authored
Use precise types in DWARF BestForm methods (llvm#126309)
I noticed that DIEInteger::BestForm used a cast to char:
if ((char)Int == SignedInt)
If 'char' happens to be unsigned, this will not behave correctly. Then I
also noticed that this code assumes the size of 'short' and 'int'.
This patch changes this code to use more precise types. No functional
change should be visible on ordinary hosts.1 parent 123dca9 commit c0a6f7a
1 file changed
+12
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
1025 | 1025 | | |
1026 | 1026 | | |
1027 | 1027 | | |
1028 | | - | |
| 1028 | + | |
1029 | 1029 | | |
1030 | | - | |
| 1030 | + | |
1031 | 1031 | | |
1032 | | - | |
| 1032 | + | |
1033 | 1033 | | |
1034 | 1034 | | |
1035 | 1035 | | |
| |||
1058 | 1058 | | |
1059 | 1059 | | |
1060 | 1060 | | |
1061 | | - | |
| 1061 | + | |
1062 | 1062 | | |
1063 | | - | |
| 1063 | + | |
1064 | 1064 | | |
1065 | | - | |
| 1065 | + | |
1066 | 1066 | | |
1067 | 1067 | | |
1068 | 1068 | | |
| |||
0 commit comments