llvm.org GIT mirror llvm / a729daf
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 Tanya Lattner 11 years ago
1 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
2525 return data
2626
2727 def read32(self):
28 return struct.unpack('><'[self.isLSB] + 'I', self.read(4))[0]
28 # Force to 32-bit, if possible; otherwise these might be long ints on a
29 # big-endian platform. FIXME: Why???
30 Value = struct.unpack('><'[self.isLSB] + 'I', self.read(4))[0]
31 return int(Value)
2932
3033 def dumpmacho(path, opts):
3134 f = Reader(path)