| 1254 | } |
| 1255 | |
| 1256 | s32 flatten(UnitCompiler &c, CompileOptions &opts) |
| 1257 | { |
| 1258 | auto cur = hash_map::begin(c._units); |
| 1259 | auto end = hash_map::end(c._units); |
| 1260 | for (; cur != end; ++cur) { |
| 1261 | HASH_MAP_SKIP_HOLE(c._units, cur); |
| 1262 | |
| 1263 | s32 err = assign_unit_indices(c, cur->second, UINT32_MAX, opts); |
| 1264 | ENSURE_OR_RETURN(UNIT_COMPILER, err == 0, opts); |
| 1265 | } |
| 1266 | |
| 1267 | cur = hash_map::begin(c._units); |
| 1268 | end = hash_map::end(c._units); |
| 1269 | for (; cur != end; ++cur) { |
| 1270 | HASH_MAP_SKIP_HOLE(c._units, cur); |
| 1271 | |
| 1272 | s32 err = flatten_unit(c, cur->second, UINT32_MAX, opts); |
| 1273 | ENSURE_OR_RETURN(UNIT_COMPILER, err == 0, opts); |
| 1274 | } |
| 1275 | |
| 1276 | return 0; |
| 1277 | } |
| 1278 | |
| 1279 | s32 blob(Buffer &output, UnitCompiler &c) |
| 1280 | { |
no test coverage detected