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 {
121
121
OriginalRelValueRef.Addend = Addend;
122
122
OriginalRelValueRef.SymbolName = TargetName.data ();
123
123
124
- auto Stub = Stubs.find (OriginalRelValueRef);
125
- if (Stub == Stubs. end () ) {
124
+ auto [ Stub, Inserted] = Stubs.try_emplace (OriginalRelValueRef);
125
+ if (Inserted ) {
126
126
LLVM_DEBUG (dbgs () << " Create a new stub function for "
127
127
<< TargetName.data () << " \n " );
128
128
129
129
StubOffset = Section.getStubOffset ();
130
- Stubs[OriginalRelValueRef] = StubOffset;
130
+ Stub-> second = StubOffset;
131
131
createStubFunction (Section.getAddressWithOffset (StubOffset));
132
132
Section.advanceStubOffset (getMaxStubSize ());
133
133
} else {
Original file line number Diff line number Diff line change @@ -160,13 +160,13 @@ class RuntimeDyldCOFFX86_64 : public RuntimeDyldCOFF {
160
160
OriginalRelValueRef.Addend = Addend;
161
161
OriginalRelValueRef.SymbolName = TargetName.data ();
162
162
163
- auto Stub = Stubs.find (OriginalRelValueRef);
164
- if (Stub == Stubs. end () ) {
163
+ auto [ Stub, Inserted] = Stubs.try_emplace (OriginalRelValueRef);
164
+ if (Inserted ) {
165
165
LLVM_DEBUG (dbgs () << " Create a new stub function for "
166
166
<< TargetName.data () << " \n " );
167
167
168
168
StubOffset = Section.getStubOffset ();
169
- Stubs[OriginalRelValueRef] = StubOffset;
169
+ Stub-> second = StubOffset;
170
170
createStubFunction (Section.getAddressWithOffset (StubOffset));
171
171
Section.advanceStubOffset (getMaxStubSize ());
172
172
} else {
You can’t perform that action at this time.
0 commit comments