summaryrefslogtreecommitdiffstats
path: root/clang/utils/ABITest
Commit message (Collapse)AuthorAgeFilesLines
* Portable Python script across Python versionSerge Guelton2018-12-182-2/+2
| | | | | | | | Make scripts more future-proof by importing most __future__ stuff. Differential Revision: https://reviews.llvm.org/D55208 llvm-svn: 349504
* Portable Python script across Python versionSerge Guelton2018-12-182-6/+6
| | | | | | | | | | | In Python3, dict.items, dict.keys, dict.values, zip, map and filter no longer return lists, they create generator instead. The portability patch consists in forcing an extra `list` call if the result is actually used as a list. `map` are replaced by list comprehension and `filter` by filtered list comprehension. Differential Revision: https://reviews.llvm.org/D55197 llvm-svn: 349501
* Portable Python script across Python versionSerge Guelton2018-12-181-2/+2
| | | | | | | | | In Python2, division between integer yields an integer, while it yields a float in Python3. Use a combination of from __future__ import division and // operator to get a portable behavior. Differential Revision: https://reviews.llvm.org/D55204 llvm-svn: 349455
* Portable Python script across Python versionSerge Guelton2018-12-183-76/+79
| | | | | | | | 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 llvm-svn: 349454
* Portable Python script across Python versionSerge Guelton2018-12-182-2/+2
| | | | | | | | Replace `xrange(...)` by either `range(...)` or `list(range(...))` depending on the context. Differential Revision: https://reviews.llvm.org/D55193 llvm-svn: 349448
* Portable Python script across Python versionSerge Guelton2018-12-032-2/+4
| | | | | | | | Python3 does not support type destructuring in function parameters. Differential Revision: https://reviews.llvm.org/D55198 llvm-svn: 348129
* Portable Python script across versionSerge Guelton2018-12-032-2/+2
| | | | | | | | | Have all classes derive from object: that's implicitly the default in Python3, it needs to be done explicilty in Python2. Differential Revision: https://reviews.llvm.org/D55121 llvm-svn: 348127
* Portable Python script across Python versionSerge Guelton2018-12-033-13/+13
| | | | | | | | | | | | | | 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 llvm-svn: 348126
* Add back the ABITest makefilesChris Bieneman2016-02-036-0/+272
| | | | | | These files are standalone and not integrated with CMake, so we probably want them. llvm-svn: 259667
* Remove autoconf supportChris Bieneman2016-01-266-272/+0
| | | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "This is the way [autoconf] ends Not with a bang but a whimper." -T.S. Eliot Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D16472 llvm-svn: 258862
* Fix invalid test generation by utils/ABITest/ABITestGen.py when the same ↵Daniel Sanders2014-08-212-2/+6
| | | | | | | | | | | | | | | | | | | | | | | enum is generated more than once. When generating records/unions, the same enum type may be generated more than once (with different names). In these cases, the name of the enum values are not sufficiently unique to prevent multiple declarations. E.g: typedef enum T3 { enum0val0 } T3; typedef T3 T2[3]; typedef enum T4 { enum0val0 } T4; typedef union T1 { T2 field0; T4 field1; char field2; } T1; Added a unique suffix to enum values so that multiple identical enum types do not use the same enum value names. One example of this bug is produced by: ABITestGen.py --no-unsigned --no-vector --no-complex --no-bool \ --max-args 0 --max-record-depth 1 -o inputs/test.9921.a.c \ -T inputs/test.9921.b.c -D inputs/test.9921.driver.c \ --min=9921 --count=1 llvm-svn: 216166
* Fix constructor-related typos.Benjamin Kramer2013-09-091-1/+1
| | | | | | Noticed by Roman Divacky. llvm-svn: 190311
* utils/ABITest: Factor out type naming code slightly.Daniel Dunbar2010-09-272-10/+24
| | | | llvm-svn: 114867
* utils/ABITest: Tweak default bit-field types to cover some more interesting ↵Daniel Dunbar2010-09-271-2/+4
| | | | | | cases. llvm-svn: 114866
* utils/ABITest: Add a workaround for mismatches due to PR5579.Daniel Dunbar2010-09-271-1/+7
| | | | llvm-svn: 114865
* utils/ABITest: Add option to skip individual tests by index.Daniel Dunbar2010-09-271-0/+6
| | | | llvm-svn: 114864
* Implement promotion for enumeration types.Douglas Gregor2010-02-022-1/+96
| | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 95117
* Include <stdlib.h>, so that we're sure to get atoi.Douglas Gregor2010-02-021-1/+2
| | | | llvm-svn: 95095
* Whoops, did not mean to commit thisAnders Carlsson2009-08-161-1/+1
| | | | llvm-svn: 79201
* Store the delete operator for delete expressions.Anders Carlsson2009-08-161-1/+1
| | | | llvm-svn: 79200
* Whoops, did not mean to check this in.Anders Carlsson2009-07-251-2/+2
| | | | llvm-svn: 77022
* More work on the constant struct builder. We now try to layout all constant ↵Anders Carlsson2009-07-251-2/+2
| | | | | | structs but throw away the result. llvm-svn: 77021
* Use /usr/bin/env trick to find python. Patch by Krister Walfridsson.Eli Friedman2009-07-101-1/+1
| | | | llvm-svn: 75271
* Minor build system changes to make ABITest work correctly on Linux.Eli Friedman2009-05-254-5/+5
| | | | llvm-svn: 72405
* Some minor corrections: don't use offsetof on a bitfield, and cast Eli Friedman2009-05-251-4/+4
| | | | | | printf operands to long to suppress warnings. llvm-svn: 72404
* ABITest: Improve test driver marginally, to allow running a specificDaniel Dunbar2009-05-081-4/+12
| | | | | | test index. llvm-svn: 71295
* ABITest: Move more of the common Makefile bits into the commonDaniel Dunbar2009-05-086-214/+20
| | | | | | Makefile. llvm-svn: 71274
* ABITest: Fix a bug in generating test values for structures w/ noDaniel Dunbar2009-05-081-14/+10
| | | | | | non-padding fields. llvm-svn: 71273
* ABITest: Move default set of test args into common makefile.Daniel Dunbar2009-05-086-3/+55
| | | | | | Also, tweak default list of bit-fields to try. llvm-svn: 71246
* Add various other bits I use to run ABITest.Daniel Dunbar2009-05-088-1/+252
| | | | llvm-svn: 71201
* Add to the house of cards that is ABITestGen.Daniel Dunbar2009-05-072-46/+136
| | | | | | - Support generating structures with bit-fields. llvm-svn: 71192
* ABITestGen: Add v2i16 and v16f32 as default vector types to generate.Daniel Dunbar2009-03-021-1/+1
| | | | llvm-svn: 65810
* ABITestGen: Use explicit list of vector types instead of just a listDaniel Dunbar2009-02-221-10/+30
| | | | | | | of sizes. Turns out we don't care very much about vector types that don't map to the hardware. llvm-svn: 65263
* ABITest: Add some checking of values for return types; useful forDaniel Dunbar2009-02-171-1/+35
| | | | | | catching internal consistency problems (esp. w/ reference compiler). llvm-svn: 64847
* Note some more things to integrate into ABITestDaniel Dunbar2009-02-171-0/+3
| | | | llvm-svn: 64846
* ABITest: Makefile tweaksDaniel Dunbar2009-01-292-24/+52
| | | | llvm-svn: 63330
* ABITest: Fix access to array test values.Daniel Dunbar2009-01-291-1/+4
| | | | llvm-svn: 63296
* ABITest: Fix test value generation for unions.Daniel Dunbar2009-01-291-1/+8
| | | | llvm-svn: 63286
* Use xcc (instead of clang directly).Daniel Dunbar2009-01-291-6/+5
| | | | llvm-svn: 63279
* ABITest: Support --test-layout option for generatingDaniel Dunbar2009-01-282-7/+120
| | | | | | | size/alignment/offsetof based tests of types instead of calling convention tests. llvm-svn: 63167
* ABITestGen: Add generation of vector types.Daniel Dunbar2009-01-262-24/+41
| | | | llvm-svn: 63024
* Add simple make based harness for running ABI tests.Daniel Dunbar2009-01-242-0/+128
| | | | llvm-svn: 62916
* Add utils/ABITest, my ABI test generation tool.Daniel Dunbar2009-01-153-0/+1068
- 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. :) llvm-svn: 62253
OpenPOWER on IntegriCloud