diff options
author | Tanya Lattner <tonic@nondot.org> | 2009-08-23 03:07:48 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2009-08-23 03:07:48 +0000 |
commit | a729daf695c66532793f72d69a7c27404119bd6c (patch) | |
tree | 1410a886487d954d80218ca94009384fcd6102d2 | |
parent | 8d18b5a8370eb9b1827d7d8b95b979c52a0df1b5 (diff) |
Merge 79736 from mainline.
llvm-mc: Hopefully fix Mach-O tests on big-endian platforms, force values to be
converted to Python ints if possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_26@79810 91177308-0d34-0410-b5e6-96231b3b80d8
-rwxr-xr-x | test/Scripts/macho-dump | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/Scripts/macho-dump b/test/Scripts/macho-dump index e844197a6c..31b9451305 100755 --- a/test/Scripts/macho-dump +++ b/test/Scripts/macho-dump @@ -26,7 +26,10 @@ class Reader: return data def read32(self): - return struct.unpack('><'[self.isLSB] + 'I', self.read(4))[0] + # Force to 32-bit, if possible; otherwise these might be long ints on a + # big-endian platform. FIXME: Why??? + Value = struct.unpack('><'[self.isLSB] + 'I', self.read(4))[0] + return int(Value) def dumpmacho(path, opts): f = Reader(path) |