mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Reflection] Change ReadBytesFunction to return a pointer rather than copying data, and adjust its users accordingly.
rdar://problem/37538580
This commit is contained in:
@@ -42,9 +42,9 @@ class InProcessMemoryReader final : public MemoryReader {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool readBytes(RemoteAddress address, uint8_t *dest, uint64_t size) override {
|
||||
std::memcpy(dest, address.getLocalPointer<void>(), (size_t) size);
|
||||
return true;
|
||||
std::tuple<const void *, std::function<void()>>
|
||||
readBytes(RemoteAddress address, uint64_t size) override {
|
||||
return std::make_tuple(address.getLocalPointer<void>(), []{});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user