Don't fetch pointers from a InMemoryStruct.
InMemoryStruct is extremely dangerous as it returns data from an internal
buffer when the endiannes doesn't match. This should fix the tests on big
endian hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178875 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp
index c324ff1..e9d2b3b 100644
--- a/tools/llvm-objdump/MachODump.cpp
+++ b/tools/llvm-objdump/MachODump.cpp
@@ -337,10 +337,9 @@
SectName != "__text")
continue; // Skip non-text sections
- StringRef SegmentName;
DataRefImpl DR = Sections[SectIdx].getRawDataRefImpl();
- if (MachOOF->getSectionFinalSegmentName(DR, SegmentName) ||
- SegmentName != "__TEXT")
+ StringRef SegmentName = MachOOF->getSectionFinalSegmentName(DR);
+ if (SegmentName != "__TEXT")
continue;
// Insert the functions from the function starts segment into our map.