Skip to content

Commit 4852d57

Browse files
committed
[RemoteMirrors] Don't use addImage in swift-reflection-dump, it doesn't work if the target bitness doesn't match our bitness.
1 parent 9a27add commit 4852d57

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

tools/swift-reflection-dump/swift-reflection-dump.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ static T unwrap(llvm::Expected<T> value) {
8383
exit(EXIT_FAILURE);
8484
}
8585

86-
#if !(defined(__APPLE__) && defined(__MACH__))
8786
static SectionRef getSectionRef(const ObjectFile *objectFile,
8887
ArrayRef<StringRef> anySectionNames) {
8988
for (auto section : objectFile->sections()) {
@@ -150,7 +149,6 @@ static ReflectionInfo findReflectionInfo(const ObjectFile *objectFile) {
150149
/*RemoteStartAddress*/ startAddress,
151150
};
152151
}
153-
#endif // defined(__APPLE__) && defined(__MACH__)
154152

155153
using NativeReflectionContext
156154
= ReflectionContext<External<RuntimeTarget<sizeof(uintptr_t)>>>;
@@ -253,11 +251,7 @@ static int doDumpReflectionSections(ArrayRef<std::string> binaryFilenames,
253251
objectOwners.push_back(std::move(objectOwner));
254252
objectFiles.push_back(objectFile);
255253

256-
#if defined(__APPLE__) && defined(__MACH__)
257-
context.addImage(RemoteAddress((uint64_t)(objectFile->getData().begin())));
258-
#else
259254
context.addReflectionInfo(findReflectionInfo(objectFile));
260-
#endif
261255
}
262256

263257
switch (action) {

0 commit comments

Comments
 (0)