diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-09-27 20:13:19 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-09-27 20:13:19 +0000 |
commit | 3dbe0b76efdd33b2ba96a1fe532a52e5926e09a4 (patch) | |
tree | 8ccc39ba85252ca49d0093a4b27e5ec33452e9f5 | |
parent | 1ca717b766163f0aecdebd5aa1d1fac91fcab8ec (diff) |
utils/ABITest: Add a workaround for mismatches due to PR5579.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114865 91177308-0d34-0410-b5e6-96231b3b80d8
-rwxr-xr-x | utils/ABITest/ABITestGen.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/ABITest/ABITestGen.py b/utils/ABITest/ABITestGen.py index 88dde269bd..7543dffc91 100755 --- a/utils/ABITest/ABITestGen.py +++ b/utils/ABITest/ABITestGen.py @@ -263,6 +263,11 @@ class TypePrinter: 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 @@ class TypePrinter: 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): |