This repository was archived by the owner on Mar 28, 2020. It is now read-only.
Commit b85b8cd
committed
WebAssembly: properly handle MCBinaryExpr in aliased symbols
Swift uses aliased symbols to refer to offsets within metadata structures.
eg
```
@"$s12SwiftPrivate28_stdlib_ShardedAtomicCounterVN" = alias %swift.type, bitcast (i32* getelementptr inbounds (<{ i8**, i32, <{ i32, i32, i32, i32, i32, i32, i32 }>*, i32, i32 }>, <{ i8**, i32, <{ i32, i32, i32, i32, i32, i32, i32 }>*, i32, i32 }>* @"$s12SwiftPrivate28_stdlib_ShardedAtomicCounterVMf", i32 0, i32 1) to %swift.type*)
```
My previous commit only got the alias to refer to the correct target symbol,
but not at the right offset.
This commit properly emits these symbols.
With this change, print("hello world") works but print() with anything else is still broken.1 parent 945cb79 commit b85b8cd
1 file changed
+27
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1187 | 1187 | | |
1188 | 1188 | | |
1189 | 1189 | | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
1190 | 1207 | | |
1191 | 1208 | | |
1192 | 1209 | | |
| |||
1461 | 1478 | | |
1462 | 1479 | | |
1463 | 1480 | | |
| 1481 | + | |
1464 | 1482 | | |
1465 | 1483 | | |
1466 | 1484 | | |
| |||
1472 | 1490 | | |
1473 | 1491 | | |
1474 | 1492 | | |
1475 | | - | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
1476 | 1500 | | |
| 1501 | + | |
| 1502 | + | |
1477 | 1503 | | |
1478 | 1504 | | |
1479 | 1505 | | |
| |||
0 commit comments