[llvm-commits] [llvm] r79736 - /llvm/trunk/test/Scripts/macho-dump
Daniel Dunbar
daniel at zuster.org
Sat Aug 22 02:28:34 PDT 2009
Author: ddunbar
Date: Sat Aug 22 04:28:33 2009
New Revision: 79736
URL: http://llvm.org/viewvc/llvm-project?rev=79736&view=rev
Log:
llvm-mc: Hopefully fix Mach-O tests on big-endian platforms, force values to be
converted to Python ints if possible.
Modified:
llvm/trunk/test/Scripts/macho-dump
Modified: llvm/trunk/test/Scripts/macho-dump
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Scripts/macho-dump?rev=79736&r1=79735&r2=79736&view=diff
==============================================================================
--- llvm/trunk/test/Scripts/macho-dump (original)
+++ llvm/trunk/test/Scripts/macho-dump Sat Aug 22 04:28:33 2009
@@ -37,7 +37,10 @@
return struct.unpack('><'[self.isLSB] + 'H', self.read(2))[0]
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 registerStringTable(self, strings):
if self.string_table is not None:
More information about the llvm-commits
mailing list