authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2021-08-04 10:47:11+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2021-08-12 10:20:57+02:00
logf49aa960a93b401b8e33292cf37a0de1eec312c0
treebaf74bb34105f6cb4b14d84614fe3423b162e2a6
parentf01366e8b3ff46831feef2ceb13c5602c0ae3e99

macho: use ArrayHashMap.popOrNull where applicable


1 files changed, 2 insertions(+), 5 deletions(-)

src/link/MachO.zig+2-5
......@@ -2329,11 +2329,8 @@ fn resolveSymbols(self: *MachO) !void {
23292329
23302330 // Convert any tentative definition into a regular symbol and allocate
23312331 // text blocks for each tentative defintion.
2332 var tentatives_count: usize = 0;
2333 const ntentatives = tentatives.count();
2334 while (tentatives_count < ntentatives) : (tentatives_count += 1) {
2335 const index = tentatives.pop().key;
2336 const sym = &self.globals.items[index];
2332 while (tentatives.popOrNull()) |entry| {
2333 const sym = &self.globals.items[entry.key];
23372334 const match: MatchingSection = blk: {
23382335 if (self.common_section_index == null) {
23392336 const data_seg = &self.load_commands.items[self.data_segment_cmd_index.?].Segment;