Douglas Gregor
d42a0fb41b
Upgrade the "excess elements in array initializer" warning to an
...
error, since both C99 and C++ consider it an error. For reference, GCC
makes this a warning while G++ makes it an error.
llvm-svn: 63435
2009-01-30 22:26:29 +00:00
Anders Carlsson
221483dd4e
Make sure to cast the VLA size of array to the type of size_t. Fixes PR3442.
...
llvm-svn: 63394
2009-01-30 16:41:04 +00:00
Nuno Lopes
92f95eb739
enable test as it already works
...
llvm-svn: 63390
2009-01-30 12:58:18 +00:00
Douglas Gregor
0202cb406e
Introduce a new expression node, ImplicitValueInitExpr, that
...
represents an implicit value-initialization of a subobject of a
particular type. This replaces the (ab)use of CXXZeroValueInitExpr
within initializer lists for the "holes" that occur due to the use of
C99 designated initializers.
The new test case is currently XFAIL'd, because CodeGen's
ConstExprEmitter (in lib/CodeGen/CGExprConstant.cpp) needs to be
taught to value-initialize when it sees ImplicitValueInitExprs.
llvm-svn: 63317
2009-01-29 17:44:32 +00:00
Daniel Dunbar
74f2425b89
Evaluate ==,!= for complex types.
...
llvm-svn: 63280
2009-01-29 06:43:41 +00:00
Daniel Dunbar
f50e60b23a
Implement basic _Complex integer constant folding.
...
- Merged into single ComplexEvaluator, these share too much logic to
be worth splitting for float/int (IMHO). Will split on request.
llvm-svn: 63248
2009-01-28 22:24:07 +00:00
Nuno Lopes
bb537dc189
fix PR3427: fix debuginfo for incomplete array types
...
llvm-svn: 63158
2009-01-28 00:35:17 +00:00
Anders Carlsson
570c357ded
If an input constraint refers to an output constraint, it should have the same constraint info as the output constraint. Fixes PR3417
...
llvm-svn: 63127
2009-01-27 20:38:24 +00:00
Chris Lattner
75441a3870
eliminate some random .ll file outputs
...
llvm-svn: 63117
2009-01-27 18:56:08 +00:00
Daniel Dunbar
7a88d1fcc4
Fix definition of __builtin_ia32_vec_set_v2di and de-XFAIL
...
builtins-x86.c.
llvm-svn: 63069
2009-01-26 23:43:02 +00:00
Eli Friedman
c69d454d5a
Make the constant folder aware of
...
__builtin___CFStringMakeConstantString. (We get into trouble in
GenerateStaticBlockVarDecl if the constant folder isn't accurate.)
llvm-svn: 62949
2009-01-25 01:54:01 +00:00
Eli Friedman
529a99bcf4
Fix the address of a label to be properly considered and emitted as a
...
constant.
llvm-svn: 62948
2009-01-25 01:21:06 +00:00
Eli Friedman
8549e5dcc8
Fix for PR2910: implement CodeGen for non-constant offsetof.
...
Note that there are still other issues in this area; see PR3396.
llvm-svn: 62942
2009-01-24 22:38:55 +00:00
Daniel Dunbar
42a8cd37b2
Handle pointer arithmetic on function pointers.
...
- <rdar://problem/6518844> Clang-generated bitcode crashes LLVM while compiling function pointer addition expression
llvm-svn: 62857
2009-01-23 18:51:09 +00:00
Daniel Dunbar
56493b0d54
Allow creation of "dummy" compile units for debug information.
...
- Although gross, this is needed currently to ensure that we produce
well formed debug information (to match pace with the assertions
being added to DebugInfo in LLVM).
llvm-svn: 62734
2009-01-22 00:09:25 +00:00
Nate Begeman
b699c9bf57
Vector codegen improvements
...
llvm-svn: 62458
2009-01-18 06:42:49 +00:00
Nate Begeman
2f2bdeb5df
Support evaluation of vector constant expressions, and codegen of same.
...
llvm-svn: 62455
2009-01-18 03:20:47 +00:00
Nate Begeman
7e5185b264
A couple more vector component access fixes.
...
llvm-svn: 62443
2009-01-18 02:01:21 +00:00
Nuno Lopes
4d78cf0fa7
add support for usage of cast to union thing with static vars
...
llvm-svn: 62387
2009-01-17 00:48:48 +00:00
Nuno Lopes
7ffcf93b24
add codegen support to union casts
...
init of static vars still not working. I'll get back to it tomorrow or so
llvm-svn: 62278
2009-01-15 20:14:33 +00:00
Daniel Dunbar
dec798bf37
Bug fix, __private_extern__ globals were always introducing a definition.
...
llvm-svn: 62139
2009-01-13 02:25:00 +00:00
Anders Carlsson
00057e4e09
Handle multi-value inputs
...
llvm-svn: 62069
2009-01-12 02:22:13 +00:00
Anders Carlsson
431acd1129
More inline asm fixes
...
llvm-svn: 62049
2009-01-11 21:23:27 +00:00
Anders Carlsson
a948c34b0b
Handle readwrite constraints correctly
...
llvm-svn: 62043
2009-01-11 19:46:50 +00:00
Chris Lattner
610c87cad6
rename these tests to match the attribute.
...
llvm-svn: 61770
2009-01-05 23:10:19 +00:00
Daniel Dunbar
0d2bfec51d
Remainder is only valid on integer vector operands.
...
Improve ext vector test case.
llvm-svn: 61766
2009-01-05 22:55:36 +00:00
Anders Carlsson
762e162284
Fix the bug that would cause Python to crash at startup.
...
When emitting the static variables we need to make sure that the order is preserved.
Fix this by making StaticDecls a std::list which has O(1) random removal.
llvm-svn: 61621
2009-01-04 02:08:04 +00:00
Anton Korobeynikov
d72f47aa05
Add full dllimport / dllexport support: both sema checks and codegen.
...
Patch by Ilya Okonsky
llvm-svn: 61437
2008-12-26 00:52:02 +00:00
Anders Carlsson
118467dfb7
Commit the right version of the test
...
llvm-svn: 61302
2008-12-21 03:40:32 +00:00
Anders Carlsson
76dbc0423e
Make sure to emit the size expression for sizeof(type)
...
llvm-svn: 61301
2008-12-21 03:33:21 +00:00
Eli Friedman
f4084708cd
Make VLAs usable, and make basic usage work correctly. Also, add a
...
simple test that actually does VLA codegen.
Note that despite the fact that the alloca isn't in the entry block, it
should dominate all uses; this is guaranteed by the restrictions on goto
into VLA scope in C99.
llvm-svn: 61291
2008-12-20 23:11:59 +00:00
Anders Carlsson
6200f0c533
Add some ErrorUnsupported calls and turn on VLA codegen again.
...
llvm-svn: 61283
2008-12-20 19:33:21 +00:00
Chris Lattner
3d72297909
diagnose C99 6.9.1p5, C arguments in definitions that are lacking
...
a name. This implements PR3208.
llvm-svn: 61127
2008-12-17 07:32:46 +00:00
Sebastian Redl
19ed30be38
stdlib.h is the wrong header for printf, and introduces test-breaking definitions of inlines on Linux
...
llvm-svn: 60981
2008-12-13 15:31:28 +00:00
Daniel Dunbar
a4daf203fe
Add test case for using mmintrin (and making sure that inlining is
...
working with and without debug info).
llvm-svn: 60960
2008-12-12 19:12:02 +00:00
Anders Carlsson
45f4b8c0f2
Fix invalid bit-field.
...
llvm-svn: 60627
2008-12-06 20:32:39 +00:00
Anders Carlsson
1e495d9860
Make Sema::CheckForConstantInitializer use Expr::Evaluate. This fixes PR3130.
...
llvm-svn: 60580
2008-12-05 05:09:56 +00:00
Anders Carlsson
6a113d9ddb
If a global var decl has an initializer, make sure to always set its linkage to external.
...
llvm-svn: 60462
2008-12-03 05:51:23 +00:00
Eli Friedman
e918435f94
Fix for PR3150: obvious copy-paste bug in
...
ScalarExprEmitter::VisitBinLOr.
llvm-svn: 60415
2008-12-02 16:02:46 +00:00
Anders Carlsson
f7a9a92359
Convert incomplete array types before emitting debug info for them, fixes PR3134.
...
llvm-svn: 60109
2008-11-26 17:40:42 +00:00
Anders Carlsson
32ef8ceaa1
Handle returning complex types that get coerced. Fixes PR3131
...
llvm-svn: 60058
2008-11-25 22:21:48 +00:00
Anders Carlsson
a7c5eb72a0
Reimplement Expr::isConstantExpr in terms of Expr::Evaluate. This fixes PR2832.
...
llvm-svn: 59946
2008-11-24 05:23:59 +00:00
Anders Carlsson
87da2b5dce
Forgot the newline :)
...
llvm-svn: 59942
2008-11-24 05:13:45 +00:00
Anders Carlsson
3abcb58a35
Add test case for bug that's been fixed.
...
llvm-svn: 59941
2008-11-24 05:11:21 +00:00
Anders Carlsson
4d5f2e532c
Add test for PR2992.
...
llvm-svn: 59861
2008-11-22 06:42:54 +00:00
Nuno Lopes
0e33c688d5
fix folding of '*doubleArray'
...
llvm-svn: 59647
2008-11-19 17:44:31 +00:00
Daniel Dunbar
9b1335eca8
Fix redundant load of bit-fields on assignment (to get the updated
...
value).
- Use extra argument to EmitStoreThroughLValue to provide place to
write update bit-field value if caller requires it.
- This fixes several FIXMEs.
llvm-svn: 59615
2008-11-19 09:36:46 +00:00
Nuno Lopes
e236a48210
fix folding of comma if given a non-constant operand.
...
Eli please take a look, as I'm not sure if this gets the extension warning in the right place
llvm-svn: 59422
2008-11-16 20:09:07 +00:00
Sebastian Redl
85a4019167
Fix testcase for 64-bit systems.
...
llvm-svn: 59099
2008-11-12 00:18:32 +00:00
Anton Korobeynikov
fdf389b9e4
Codegen support for fastcall & stdcall CC.
...
Patch by Ilya Okonsky!
llvm-svn: 59080
2008-11-11 20:21:14 +00:00