Skip to content

Commit 04cbdfa

Browse files
author
Davide Italiano
committed
[ReflectionContext] Save buffers and set the correct addresses.
1 parent 177293d commit 04cbdfa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/swift/Reflection/ReflectionContext.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ class ReflectionContext
212212
ReflStrMdSec.first.first == nullptr)
213213
return false;
214214

215-
auto LocalStartAddress = reinterpret_cast<uintptr_t>(Buf.get());
216-
auto RemoteStartAddress = static_cast<uintptr_t>(ImageStart.getAddressData());
215+
auto LocalStartAddress = reinterpret_cast<uintptr_t>(SectBuf.get());
216+
auto RemoteStartAddress = static_cast<uintptr_t>(RangeStart);
217217

218218
ReflectionInfo info = {
219219
{{FieldMdSec.first.first, FieldMdSec.first.second}, 0},
@@ -246,6 +246,8 @@ class ReflectionContext
246246
}
247247

248248
savedBuffers.push_back(std::move(Buf));
249+
savedBuffers.push_back(std::move(SectBuf));
250+
savedBuffers.push_back(std::move(Sections));
249251
return true;
250252
}
251253

0 commit comments

Comments
 (0)