aboutsummaryrefslogtreecommitdiff
path: root/utils/ABITest
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-05-25 21:38:01 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-05-25 21:38:01 +0000
commit98a7170db80e43195068a2710088fd5532924c77 (patch)
tree86a535766b9e0badd620cd998e01c4248ee0b7d0 /utils/ABITest
parent1eed60297ef4701b899c6a3b9680bf08f3403422 (diff)
Some minor corrections: don't use offsetof on a bitfield, and cast
printf operands to long to suppress warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72404 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/ABITest')
-rwxr-xr-xutils/ABITest/ABITestGen.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/ABITest/ABITestGen.py b/utils/ABITest/ABITestGen.py
index 570d40e8c4..5598caae3d 100755
--- a/utils/ABITest/ABITestGen.py
+++ b/utils/ABITest/ABITestGen.py
@@ -244,16 +244,16 @@ class TypePrinter:
raise NotImplementedError,'Cannot make tests values of type: "%s"'%(t,)
def printSizeOfType(self, prefix, name, t, output=None, indent=2):
- print >>output, '%*sprintf("%s: sizeof(%s) = %%ld\\n", sizeof(%s));'%(indent, '', prefix, name, name)
+ print >>output, '%*sprintf("%s: sizeof(%s) = %%ld\\n", (long)sizeof(%s));'%(indent, '', prefix, name, name)
def printAlignOfType(self, prefix, name, t, output=None, indent=2):
- print >>output, '%*sprintf("%s: __alignof__(%s) = %%ld\\n", __alignof__(%s));'%(indent, '', prefix, name, name)
+ print >>output, '%*sprintf("%s: __alignof__(%s) = %%ld\\n", (long)__alignof__(%s));'%(indent, '', prefix, name, name)
def printOffsetsOfType(self, prefix, name, t, output=None, indent=2):
if isinstance(t, RecordType):
for i,f in enumerate(t.fields):
- if f.isPaddingBitField():
+ if f.isBitField():
continue
fname = 'field%d' % i
- print >>output, '%*sprintf("%s: __builtin_offsetof(%s, %s) = %%ld\\n", __builtin_offsetof(%s, %s));'%(indent, '', prefix, name, fname, name, fname)
+ print >>output, '%*sprintf("%s: __builtin_offsetof(%s, %s) = %%ld\\n", (long)__builtin_offsetof(%s, %s));'%(indent, '', prefix, name, fname, name, fname)
def printValueOfType(self, prefix, name, t, output=None, indent=2):
if output is None: