summaryrefslogtreecommitdiff
path: root/utils/ABITest/Enumeration.py
Commit message (Collapse)AuthorAgeFilesLines
* Portable Python script across Python versionSerge Guelton2018-12-181-1/+1
| | | | | | | | Make scripts more future-proof by importing most __future__ stuff. Differential Revision: https://reviews.llvm.org/D55208 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349504 91177308-0d34-0410-b5e6-96231b3b80d8
* Portable Python script across Python versionSerge Guelton2018-12-181-8/+9
| | | | | | | | Using from __future__ import print_function it is possible to have a compatible behavior of `print(...)` across Python version. Differential Revision: https://reviews.llvm.org/D55213 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349454 91177308-0d34-0410-b5e6-96231b3b80d8
* Portable Python script across Python versionSerge Guelton2018-12-181-1/+1
| | | | | | | | Replace `xrange(...)` by either `range(...)` or `list(range(...))` depending on the context. Differential Revision: https://reviews.llvm.org/D55193 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349448 91177308-0d34-0410-b5e6-96231b3b80d8
* Portable Python script across Python versionSerge Guelton2018-12-031-1/+2
| | | | | | | | Python3 does not support type destructuring in function parameters. Differential Revision: https://reviews.llvm.org/D55198 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348129 91177308-0d34-0410-b5e6-96231b3b80d8
* Portable Python script across Python versionSerge Guelton2018-12-031-7/+7
| | | | | | | | | | | | | | Python2 supports the two following equivalent construct raise ExceptionType, exception_value and raise ExceptionType(exception_value) Only the later is supported by Python3. Differential Revision: https://reviews.llvm.org/D55195 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348126 91177308-0d34-0410-b5e6-96231b3b80d8
* Add utils/ABITest, my ABI test generation tool.Daniel Dunbar2009-01-151-0/+276
- 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