History log of /external/clang/utils/ABITest/TypeGen.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6ffef197e9388a54f983bfd86931119e0885ce51 27-Sep-2010 Daniel Dunbar <daniel@zuster.org> utils/ABITest: Factor out type naming code slightly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/ABITest/TypeGen.py
43ec96da71b94f064ed6a3031025208d23acd592 02-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Implement promotion for enumeration types.

WHAT!?!

It turns out that Type::isPromotableIntegerType() was not considering
enumeration types to be promotable, so we would never do the
promotion despite having properly computed the promotion type when the
enum was defined. Various operations on values of enum type just
"worked" because we could still compute the integer rank of an enum
type; the oddity, however, is that operations such as "add an enum and
an unsigned" would often have an enum result type (!). The bug
actually showed up as a spurious -Wformat diagnostic
(<rdar://problem/7595366>), but in theory it could cause miscompiles.

In this commit:
- Enum types with a promotion type of "int" or "unsigned int" are
promotable.
- Tweaked the computation of promotable types for enums
- For all of the ABIs, treat enum types the same way as their
underlying types (*not* their promotion types) for argument passing
and return values
- Extend the ABI tester with support for enumeration types



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/ABITest/TypeGen.py
98cca78ecd75704998eea81031bb82f06a9ed5de 08-May-2009 Daniel Dunbar <daniel@zuster.org> Add to the house of cards that is ABITestGen.
- Support generating structures with bit-fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/ABITest/TypeGen.py
dda09c8704f47a17ca34e0aa7f3a0d3f8bc6f399 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> Note some more things to integrate into ABITest


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/ABITest/TypeGen.py
789e4babc9cf78df9565f215a119acad291aea63 26-Jan-2009 Daniel Dunbar <daniel@zuster.org> ABITestGen: Add generation of vector types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/ABITest/TypeGen.py
880c40345f903b087b52eb559cbd435f2ccac484 24-Jan-2009 Daniel Dunbar <daniel@zuster.org> Add simple make based harness for running ABI tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/ABITest/TypeGen.py
a1bfe638c03c517b110f55962adb882f47131667 15-Jan-2009 Daniel Dunbar <daniel@zuster.org> Add utils/ABITest, my ABI test generation tool.
- Mostly written as an entertaining exercise in enumerating large or
(countably, naturally) infinite sets. But hey, its useful too!

- Idea is to number all C-types so that the N-th type can quickly be
computed, with a good deal of flexibility about what types to
include, and taking some care so that the (N+1)-th type is
interestingly different from the N-th type. For example, using the
default generator, the 1,000,000-th function type is:
--
typedef _Complex int T0;
typedef char T1 __attribute__ ((vector_size (4)));
typedef int T2 __attribute__ ((vector_size (4)));
T2 fn1000000(T0 arg0, signed long long arg1, T1 arg2, T0 arg3);
--
and the 1,000,001-th type is:
--
typedef _Complex char T0;
typedef _Complex char T2;
typedef struct T1 { T2 field0; T2 field1; T2 field2; } T1;
typedef struct T3 { } T3;
unsigned short fn1000001(T0 arg0, T1 arg1, T3 arg2);
--

Computing the 10^1600-th type takes a little less than 1s. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/utils/ABITest/TypeGen.py