[cfe-commits] r114865 - /cfe/trunk/utils/ABITest/ABITestGen.py
Daniel Dunbar
daniel at zuster.org
Mon Sep 27 13:13:19 PDT 2010
Author: ddunbar
Date: Mon Sep 27 15:13:19 2010
New Revision: 114865
URL: http://llvm.org/viewvc/llvm-project?rev=114865&view=rev
Log:
utils/ABITest: Add a workaround for mismatches due to PR5579.
Modified:
cfe/trunk/utils/ABITest/ABITestGen.py
Modified: cfe/trunk/utils/ABITest/ABITestGen.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ABITest/ABITestGen.py?rev=114865&r1=114864&r2=114865&view=diff
==============================================================================
--- cfe/trunk/utils/ABITest/ABITestGen.py (original)
+++ cfe/trunk/utils/ABITest/ABITestGen.py Mon Sep 27 15:13:19 2010
@@ -263,6 +263,11 @@
if output is None:
output = self.output
if isinstance(t, BuiltinType):
+ value_expr = name
+ if t.name.split(' ')[-1] == '_Bool':
+ # Hack to work around PR5579.
+ value_expr = "%s ? 2 : 0" % name
+
if t.name.endswith('long long'):
code = 'lld'
elif t.name.endswith('long'):
@@ -275,7 +280,8 @@
code = 'Lf'
else:
code = 'p'
- print >>output, '%*sprintf("%s: %s = %%%s\\n", %s);'%(indent, '', prefix, name, code, name)
+ print >>output, '%*sprintf("%s: %s = %%%s\\n", %s);'%(
+ indent, '', prefix, name, code, value_expr)
elif isinstance(t, EnumType):
print >>output, '%*sprintf("%s: %s = %%d\\n", %s);'%(indent, '', prefix, name, name)
elif isinstance(t, RecordType):
More information about the cfe-commits
mailing list