[swift-reflection-dump] Use the new API for MachO.

<rdar://problem/42306551>
This commit is contained in:
Davide Italiano
2018-07-17 15:45:32 -07:00
parent da448fefc5
commit 2f0577a967

View File

@@ -263,7 +263,12 @@ static int doDumpReflectionSections(ArrayRef<std::string> binaryFilenames,
objectOwners.push_back(std::move(objectOwner));
objectFiles.push_back(objectFile);
#if defined(__APPLE__)
auto startAddress = (uintptr_t)objectFile->getData().begin();
context.addImage(RemoteAddress(startAddress));
#else
context.addReflectionInfo(findReflectionInfo(objectFile));
#endif
}
switch (action) {