Douglas Gregor
a71cc15361
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
llvm-svn: 95117
2010-02-02 20:10:50 +00:00
Daniel Dunbar
96ebba5770
ARM/APCS: Fix classification of small complex integer types as "integer like".
...
llvm-svn: 95030
2010-02-01 23:31:26 +00:00
Daniel Dunbar
eedf151cb1
ARM/APCS: Pass Complex types following llvm-gcc.
...
llvm-svn: 95029
2010-02-01 23:31:19 +00:00
Chris Lattner
5b5d2db3f6
Don't explicitly force utf strings into the __TEXT,__ustring
...
by setting the section of the generated global. This is an
optimization done by the code generator, and the code being
removed didn't handle the case when the string contained an
embedded nul (which the code generator does correctly
handle). This is rdar://7589850
llvm-svn: 95003
2010-02-01 20:59:08 +00:00
Devang Patel
156b11368a
New test case.
...
llvm-svn: 94821
2010-01-29 18:32:33 +00:00
Daniel Dunbar
45c7ff1d79
ARM/APCS ABI: Fix some problems with bit-fields in structures. After rereading
...
the ABI spec, this turns out to simplify the code. We still have some annoying
code which mismatches the spec with regard to empty structures.
llvm-svn: 94796
2010-01-29 03:22:29 +00:00
Anders Carlsson
b1ef991097
Fix an incorrect union layout assert. Fixes PR6164.
...
llvm-svn: 94754
2010-01-28 18:22:03 +00:00
Benjamin Kramer
b2abc13f28
Adjust testcase for recent DWARF printer changes.
...
llvm-svn: 94306
2010-01-23 10:14:58 +00:00
Mike Stump
92d487712e
Fix for Release-Asserts.
...
llvm-svn: 93340
2010-01-13 19:40:37 +00:00
Dan Gohman
d1e76b957b
Use -fno-math-errno by default, and remove the IsMathErrnoDefault
...
targethook, which is no longer being used. This fixes PR5971.
llvm-svn: 92987
2010-01-08 02:20:44 +00:00
Benjamin Kramer
0128f668a9
__builtin_object_size(ptr, type) returns -1 for type = {0,1} if there are any side-effects.
...
llvm-svn: 92453
2010-01-03 18:18:37 +00:00
Eli Friedman
906be1b580
Add test for annotate attribute for coverage.
...
llvm-svn: 92435
2010-01-03 00:51:58 +00:00
Eli Friedman
090adddf15
Fix minor oversight for increment/decrement of complex int. Add tests for
...
coverage.
llvm-svn: 92433
2010-01-03 00:20:48 +00:00
Eli Friedman
bb333722c1
Add a couple more tests for coverage.
...
llvm-svn: 92430
2010-01-02 23:21:40 +00:00
Eli Friedman
e14b1997db
Don't look through casts when looking for the underlying decl for a function
...
call; the standard doesn't expect us to, and the program could be doing
something crazy. Fixes PR5882.
llvm-svn: 92166
2009-12-26 03:35:45 +00:00
Chris Lattner
9ac2b586c7
fix typo
...
llvm-svn: 92065
2009-12-23 22:06:12 +00:00
Chris Lattner
4e1a323b85
fix opencl extvector element extraction on rvalues. We previously
...
error_unsupported on test10 and crashed on test11.
llvm-svn: 92056
2009-12-23 21:31:11 +00:00
Eric Christopher
c87915629b
Update for the intrinsic changes in llvm: the object size intrinsic
...
only takes a boolean second argument now. Update tests accordingly.
Currently the builtin still accepts the full range for compatibility.
llvm-svn: 91983
2009-12-23 03:49:37 +00:00
Daniel Dunbar
a7d0231b66
clang -cc1: Rename -mcpu to -target-cpu to match other target options and not alias driver/backend option.
...
llvm-svn: 91671
2009-12-18 06:30:12 +00:00
Daniel Dunbar
5618e98f33
Update tests to use %clang instead of 'clang', and forcibly disable use of '
...
clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to
garbage).
llvm-svn: 91460
2009-12-15 22:01:24 +00:00
Daniel Dunbar
8fbe78f6fc
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
...
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).
llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Fariborz Jahanian
a01b67d7b0
Make tests use the new clang -cc1 flag.
...
llvm-svn: 91303
2009-12-14 18:00:56 +00:00
Nate Begeman
67dfd4236a
Revert mmx palignr to use an intrinsic, since mmx shuffle patterns are missing.
...
llvm-svn: 91269
2009-12-14 05:15:02 +00:00
Nate Begeman
72ec6bc6f4
Support x86's PALIGNR instruction without the use of a palignr intrinsic.
...
llvm-svn: 91264
2009-12-14 04:57:03 +00:00
Eli Friedman
4f678f3de1
Fix for PR5709: use the computed type of the declaration instead of the
...
type of the builtin when generating the function declaration for a builtin
library call.
llvm-svn: 90936
2009-12-09 03:05:59 +00:00
Daniel Dunbar
f51087656d
Remove include of system header.
...
llvm-svn: 90883
2009-12-08 21:52:24 +00:00
Daniel Dunbar
888a89ccf2
Use clang-cc in this test.
...
llvm-svn: 90872
2009-12-08 19:49:40 +00:00
Mike Stump
b2a568d9e5
Switch over to checking .ll files instead of .s files.
...
llvm-svn: 90786
2009-12-07 19:22:29 +00:00
Chris Lattner
0f3a228e73
add 'F' to a bunch of libm builtins so that codegen doesn't die on them,
...
pointed out by Charles Davis.
llvm-svn: 90736
2009-12-07 02:09:14 +00:00
Chris Lattner
2da786f794
fix comment.
...
llvm-svn: 90660
2009-12-05 08:33:21 +00:00
Chris Lattner
ded98d4172
consolidate some tests.
...
llvm-svn: 90659
2009-12-05 08:30:04 +00:00
Chris Lattner
e99c110d06
implement rdar://7346691 by codegen'ing struct/array initializers
...
to a memset or a memcpy from a global when possible.
llvm-svn: 90658
2009-12-05 08:22:11 +00:00
Chris Lattner
ffcd06ea7c
simplify a condition and add a testcase.
...
llvm-svn: 90652
2009-12-05 06:49:57 +00:00
Daniel Dunbar
e97582406b
Use '-FOO' 'BAR' instead of '-FOO=BAR' for FOO in -stack-protector, -fvisibility, and -fconstant-string-class.
...
llvm-svn: 90072
2009-11-29 09:33:20 +00:00
Daniel Dunbar
4e7596cc3a
Normalize options to use '-FOO' instead of '--FOO'.
...
llvm-svn: 90071
2009-11-29 09:33:10 +00:00
Anders Carlsson
1299f36af1
Update a test to FileCheck.
...
llvm-svn: 89610
2009-11-22 18:56:40 +00:00
Ken Dyck
65da2db736
Use intptr_t from stdint.h (in freestanding mode) instead of redefining it here
...
with __INTPTR_TYPE__.
llvm-svn: 89609
2009-11-22 18:29:06 +00:00
Daniel Dunbar
c2588c3bd9
Convert test to FileCheck.
...
llvm-svn: 89514
2009-11-20 23:46:56 +00:00
Daniel Dunbar
32164f4bdb
Driver: Use '-target-abi' 'FOO' instead of '-target-abi=FOO'.
...
llvm-svn: 89501
2009-11-20 22:32:30 +00:00
Daniel Dunbar
4274685b63
Pass '-mcpu' 'FOO' instead of '-mcpu=FOO'.
...
llvm-svn: 89498
2009-11-20 22:21:52 +00:00
Daniel Dunbar
9c7efbb996
Fix some codegen tests to include positive checks.
...
llvm-svn: 89465
2009-11-20 17:23:39 +00:00
Daniel Dunbar
484afa2d3b
Switch -f{builtin,math-errno,rtti} and -analyzer-purge-dead to -...no... variants instead of using llvm: 🆑 :init(true) arguments.
...
llvm-svn: 89315
2009-11-19 04:55:23 +00:00
Daniel Dunbar
ba0c9e8685
Remove unnecessary &&s.
...
llvm-svn: 89153
2009-11-17 22:25:07 +00:00
David Chisnall
950a9518b1
Added block type introspection support.
...
As per Fariborz's suggestion, committed now but can be reverted later if the used flag is problematic for Apple.
llvm-svn: 89134
2009-11-17 19:33:30 +00:00
Daniel Dunbar
feedba68b5
Don't #include <stdio.h> when tests don't need it, or use clang instead of clang-cc when they do.
...
llvm-svn: 89070
2009-11-17 08:57:36 +00:00
Daniel Dunbar
f85fabec35
Remove some redundant tests.
...
llvm-svn: 89069
2009-11-17 08:57:06 +00:00
Daniel Dunbar
4930e3357b
Add -fblocks, -stack-protector, and -fobjc-nonfragile-abi defaulting to driver,
...
instead of using getDefaultLangOptions.
- Remove unused -fobjc-tight-layout while at it.
llvm-svn: 89065
2009-11-17 08:07:36 +00:00
Jakob Stoklund Olesen
4359796e52
Fix tests after enabling -split-phi-edges.
...
object-size.c aws simply too fragile.
constructor-default-arg.cpp triggers an issue when LiveVariables is run before RALocal.
llvm-svn: 89025
2009-11-17 01:47:01 +00:00
Eli Friedman
b0bc559b19
PR5526: Make sure to set the right cast kinds for the inserted implicit casts.
...
llvm-svn: 89023
2009-11-17 01:22:05 +00:00
Eli Friedman
b210fc598f
Make __func__ and friends work correctly within the initializer for a static
...
local variable.
llvm-svn: 88766
2009-11-14 08:37:13 +00:00