File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
llvm/lib/ExecutionEngine/RuntimeDyld/Targets Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -445,10 +445,10 @@ class RuntimeDyldMachOAArch64
445445 (RE.Size == 2 || RE.Size == 3 )) ||
446446 RE.Size == 2 );
447447 SectionEntry &Section = Sections[RE.SectionID ];
448- StubMap::const_iterator i = Stubs.find (Value);
448+ auto [It, Inserted] = Stubs.try_emplace (Value);
449449 int64_t Offset;
450- if (i != Stubs. end () )
451- Offset = static_cast <int64_t >(i ->second );
450+ if (!Inserted )
451+ Offset = static_cast <int64_t >(It ->second );
452452 else {
453453 // FIXME: There must be a better way to do this then to check and fix the
454454 // alignment every time!!!
@@ -458,7 +458,7 @@ class RuntimeDyldMachOAArch64
458458 (BaseAddress + Section.getStubOffset () + StubAlignment - 1 ) &
459459 -StubAlignment;
460460 unsigned StubOffset = StubAddress - BaseAddress;
461- Stubs[Value] = StubOffset;
461+ It-> second = StubOffset;
462462 assert (isAligned (getStubAlignment (), StubAddress) &&
463463 " GOT entry not aligned" );
464464 RelocationEntry GOTRE (RE.SectionID , StubOffset,
You can’t perform that action at this time.
0 commit comments