File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
llvm/lib/ExecutionEngine/RuntimeDyld/Targets Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -121,13 +121,13 @@ class RuntimeDyldCOFFAArch64 : public RuntimeDyldCOFF {
121121 OriginalRelValueRef.Addend = Addend;
122122 OriginalRelValueRef.SymbolName = TargetName.data ();
123123
124- auto Stub = Stubs.find (OriginalRelValueRef);
125- if (Stub == Stubs. end () ) {
124+ auto [ Stub, Inserted] = Stubs.try_emplace (OriginalRelValueRef);
125+ if (Inserted ) {
126126 LLVM_DEBUG (dbgs () << " Create a new stub function for "
127127 << TargetName.data () << " \n " );
128128
129129 StubOffset = Section.getStubOffset ();
130- Stubs[OriginalRelValueRef] = StubOffset;
130+ Stub-> second = StubOffset;
131131 createStubFunction (Section.getAddressWithOffset (StubOffset));
132132 Section.advanceStubOffset (getMaxStubSize ());
133133 } else {
Original file line number Diff line number Diff line change @@ -160,13 +160,13 @@ class RuntimeDyldCOFFX86_64 : public RuntimeDyldCOFF {
160160 OriginalRelValueRef.Addend = Addend;
161161 OriginalRelValueRef.SymbolName = TargetName.data ();
162162
163- auto Stub = Stubs.find (OriginalRelValueRef);
164- if (Stub == Stubs. end () ) {
163+ auto [ Stub, Inserted] = Stubs.try_emplace (OriginalRelValueRef);
164+ if (Inserted ) {
165165 LLVM_DEBUG (dbgs () << " Create a new stub function for "
166166 << TargetName.data () << " \n " );
167167
168168 StubOffset = Section.getStubOffset ();
169- Stubs[OriginalRelValueRef] = StubOffset;
169+ Stub-> second = StubOffset;
170170 createStubFunction (Section.getAddressWithOffset (StubOffset));
171171 Section.advanceStubOffset (getMaxStubSize ());
172172 } else {
You can’t perform that action at this time.
0 commit comments