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
445
445
(RE.Size == 2 || RE.Size == 3 )) ||
446
446
RE.Size == 2 );
447
447
SectionEntry &Section = Sections[RE.SectionID ];
448
- StubMap::const_iterator i = Stubs.find (Value);
448
+ auto [It, Inserted] = Stubs.try_emplace (Value);
449
449
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 );
452
452
else {
453
453
// FIXME: There must be a better way to do this then to check and fix the
454
454
// alignment every time!!!
@@ -458,7 +458,7 @@ class RuntimeDyldMachOAArch64
458
458
(BaseAddress + Section.getStubOffset () + StubAlignment - 1 ) &
459
459
-StubAlignment;
460
460
unsigned StubOffset = StubAddress - BaseAddress;
461
- Stubs[Value] = StubOffset;
461
+ It-> second = StubOffset;
462
462
assert (isAligned (getStubAlignment (), StubAddress) &&
463
463
" GOT entry not aligned" );
464
464
RelocationEntry GOTRE (RE.SectionID , StubOffset,
You can’t perform that action at this time.
0 commit comments