Chris Lattner
7ef882dca0
convert to filecheck and force a triple so that this passes on big
...
endian hosts. Fixes PR4792
llvm-svn: 80301
2009-08-27 23:22:19 +00:00
Eli Friedman
95f896380f
Make address-space qualification work correctly for compound literals.
...
Issue reported on cfe-dev.
Also fixed the code to use isConstant to determine whether to generate a
constant global, to be consistent with CodeGenModule. This probably
needs to be refactored to deal with C++, though.
llvm-svn: 80131
2009-08-26 20:01:39 +00:00
Dan Gohman
a98e0e73de
Update clang for raw_fd_ostream no longer requiring F_Force.
...
llvm-svn: 79991
2009-08-25 15:36:09 +00:00
Daniel Dunbar
87db734400
Fix a few tests to be -Asserts agnostic.
...
- Ugh.
llvm-svn: 79860
2009-08-23 19:28:59 +00:00
Daniel Dunbar
2a4061929f
Fix some made up triples.
...
llvm-svn: 79316
2009-08-18 05:30:27 +00:00
Eli Friedman
c0f6d44ef6
Make test a bit more precise.
...
llvm-svn: 79073
2009-08-15 03:35:55 +00:00
Eli Friedman
04fddf0d1f
Fix for PR4721: adjust CodeGen and ASTContext so that we have a
...
consistent model for handling size expressions for VLAs.
The model is essentially as follows: VLA types own their associated
expression. In some cases, we need to create multiple VLA types to
represent a given VLA (for canonical types, or qualifiers on array types,
or type merging). If we need to create multiple types based off of
the same VLA declaration, we use the new refcounting functionality so they can
all own the expression. The VLASizeMap in CodeGenFunction then uses the size
expression to identify the group of VLA types based off of the same original
declaration.
I'm not particularly attached to the VLA types owning the expression,
but we're stuck with at least until someone comes up with a way
to walk the VLA expressions for a declaration.
I did the parallel fix in ASTContext for DependentSizedArrayType, but I
haven't really looked closely at it, so there might still be issues
there.
I'll clean up the code duplication in ASTContext in a followup commit.
llvm-svn: 79071
2009-08-15 02:50:32 +00:00
Daniel Dunbar
e5515289fa
Update test
...
llvm-svn: 78877
2009-08-13 01:27:45 +00:00
Daniel Dunbar
d362857f4c
Update test case.
...
llvm-svn: 78699
2009-08-11 18:37:40 +00:00
Chris Lattner
2375952a47
these tests include section specifiers that aren't valid on the
...
mac, use an explicit triple.
llvm-svn: 78583
2009-08-10 18:56:44 +00:00
Anders Carlsson
e139f868b7
Add tests.
...
llvm-svn: 78491
2009-08-08 19:43:14 +00:00
Chris Lattner
f49573d1ee
weak globals that are const should get weak_odr linkage.
...
add a fixme about C++ const.
llvm-svn: 78159
2009-08-05 05:20:29 +00:00
Chris Lattner
c0693bc2ea
rdar://7119244 - globals with an explicit section specified don't get
...
common linkage.
llvm-svn: 78158
2009-08-05 04:56:58 +00:00
Anders Carlsson
5638895b2a
Revert the fix for PR3800, it broke things.
...
llvm-svn: 78084
2009-08-04 18:18:36 +00:00
Daniel Dunbar
e9863976b3
Fix test case for Darwin10 (which sets ssp), and move to CodeGen/
...
llvm-svn: 78049
2009-08-04 04:38:31 +00:00
Daniel Dunbar
4d93a4f9d4
Make sure UTF-16 strings end with a 16-bit null (as opposed to 8-bit).
...
llvm-svn: 78001
2009-08-03 21:47:08 +00:00
Anders Carlsson
7df966e040
Don't evaluate inout constraints twice. Fixes PR3800.
...
llvm-svn: 77854
2009-08-02 03:40:19 +00:00
Eli Friedman
62561fe9b0
Fix a minor issue with unions in the new struct building code.
...
llvm-svn: 77829
2009-08-01 23:11:24 +00:00
Devang Patel
fe6bbd1145
New test case for rev. 77694.
...
llvm-svn: 77698
2009-07-31 18:24:12 +00:00
Anders Carlsson
72fb384a65
Enable the new struct type builder now that the constant struct builder works. (The old code will still be there until we know that everything works well.
...
llvm-svn: 77190
2009-07-27 15:31:55 +00:00
Anders Carlsson
b7130ed888
Enable the new constant struct builder by default. The old code is still in place but will be removed shortly. The new struct builder works on big endian systems.
...
llvm-svn: 77185
2009-07-27 05:54:15 +00:00
Mike Stump
8c5d7996e8
Add noreturn as a type attribute, handle printing for them and handle
...
calls to noreturn function pointers when CFG building.
llvm-svn: 77089
2009-07-25 21:26:53 +00:00
Daniel Dunbar
6d8adef9a0
Remove empty tests, left over from an svn revert.
...
llvm-svn: 77068
2009-07-25 12:41:25 +00:00
Daniel Dunbar
97ea867690
MultiTestRunner: Validate '&&' at the end of RUN lines.
...
- This is just to normalize, these will go away soon hopefully.
Added all the missing '&&'s that have crept in. :)
llvm-svn: 77062
2009-07-25 11:27:37 +00:00
John McCall
02dee0a46a
Semantic checking for main().
...
Fix some invalid main() methods in the test suite that were nicely
exposed by the new checks.
llvm-svn: 77047
2009-07-25 04:36:53 +00:00
Mike Stump
8e79f99b16
Implement new warning for functions declared 'noreturn' when they fall off the end.
...
llvm-svn: 76932
2009-07-24 02:49:01 +00:00
Daniel Dunbar
91ade14197
Output UTF-16 string literals independent of host byte order.
...
- Steve, can you take a look at this? It seems like this code should live
elsewhere, and there is a FIXME about having Sema validates the UTF-8 to
UTF-16 conversion.
llvm-svn: 76915
2009-07-23 23:41:22 +00:00
Anders Carlsson
516e5e7835
Correct a thinko in bitfield layout code. Fixes PR4611.
...
llvm-svn: 76898
2009-07-23 21:16:33 +00:00
Anders Carlsson
d78fc89fcb
We don't need to keep track of the packed alignment, just whether the struct is packed or not. Fixes PR4610.
...
llvm-svn: 76884
2009-07-23 17:24:40 +00:00
Anders Carlsson
718a89a501
Use arrays as union padding. Also, since the resulting struct will always contain a single element and either a single i8 element or an array of i8s, there's no reason to use a packed struct.
...
llvm-svn: 76854
2009-07-23 04:50:01 +00:00
Eli Friedman
5ac69057c0
Make vectorized floating-point comparisons work without crashing.
...
llvm-svn: 76726
2009-07-22 06:07:16 +00:00
Mon P Wang
acedf7768f
Preserve address space information through member accesses, e.g.,
...
__attribute__((address_space(1))) struct {int arr[ 3 ]; } *p1;
... = p1->arr[2]; // load from address space 1
llvm-svn: 76717
2009-07-22 03:08:17 +00:00
Mike Stump
5c1acd1f33
Revert this, was a bug in my new warning code, not the test case.
...
llvm-svn: 76690
2009-07-21 23:50:15 +00:00
Mike Stump
5e7869f63e
Prep for new warning.
...
llvm-svn: 76638
2009-07-21 20:52:43 +00:00
Daniel Dunbar
c3ab4c6c98
Detect when the current generation point is unreachable after emitting
...
expressions.
- This generally catches the important case of noreturn functions.
- With the last two changes, we are down to 152 unreachable blocks emitted on
403.gcc, vs the 1805 we started with.
llvm-svn: 76364
2009-07-19 08:23:12 +00:00
Daniel Dunbar
b6adc43f6e
Avoid generation of dead code in a few more situations.
...
- Emit variable declarations as "simple", we want to avoid forcing the creation
of a dummy basic block, but still need to make the variable available for
later use.
- With that, we can now skip IRgen for other unreachable statements (which
don't define a label).
- Anders, I added two fixmes on calls to EmitVLASize, can you check them?
llvm-svn: 76361
2009-07-19 06:58:07 +00:00
Chris Lattner
3afa3e1d91
codegen string literals using private linkage now like llvm-gcc, eliminating
...
some target hooks.
llvm-svn: 75895
2009-07-16 05:03:48 +00:00
Chris Lattner
2a7deb64c0
reimplement vector comparisons as [fi]cmp+sext instead of using v[if]cmp.
...
Also, enable them in sema so that they are tested, and now that the x86 backend
has stablized.
llvm-svn: 74983
2009-07-08 01:08:03 +00:00
Chris Lattner
877a48e67a
make these tests pass with the stack canary stuff even on targets where they default to on.
...
llvm-svn: 74412
2009-06-28 19:49:49 +00:00
Bill Wendling
d63bbadbef
Add stack protector support to clang. This generates the 'ssp' and 'sspreq'
...
function attributes. There are predefined macros that are defined when stack
protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with
-fstack-protector-all.
llvm-svn: 74405
2009-06-28 07:36:13 +00:00
Devang Patel
0d425350b2
Revrt PR4228 fix for now.
...
llvm-svn: 74304
2009-06-26 18:32:22 +00:00
Chris Lattner
4c8da96ea9
fix PR4423.
...
llvm-svn: 73938
2009-06-23 01:38:41 +00:00
Eli Friedman
c619d6fab5
Add a target triple to a couple of tests which depend on it. Reported
...
by Mark Cianciosa on cfe-dev.
llvm-svn: 73672
2009-06-18 02:04:19 +00:00
Devang Patel
9fc4341eec
It is possible that main input file does not have any symbol with debug info. To handle this edge case, always create main compile unit first.
...
This fixes PR 4228.
llvm-svn: 73520
2009-06-16 18:02:02 +00:00
Chris Lattner
943658f00b
testcase for r72869, it turns out that it happens in Ruby.
...
llvm-svn: 73514
2009-06-16 17:39:02 +00:00
Eli Friedman
6282b3cff8
PR4390: Make sure to handle anonymous unions correctly while building
...
static intializers for structs.
llvm-svn: 73349
2009-06-14 21:41:37 +00:00
Eli Friedman
3192cc8526
Fix the calling convention for structs/unions containing SSE vectors on
...
x86-32. This is slightly messy, but I think it's consistent with gcc.
llvm-svn: 73306
2009-06-13 21:37:10 +00:00
Chris Lattner
4ca97c3b9e
Fix PR4372, another case where non-prototyped functions can prevent
...
always_inline from working.
llvm-svn: 73273
2009-06-13 00:26:38 +00:00
Daniel Dunbar
fd262b4a62
Fix test, which could miss failures, and also avoid leaving temporary .i file in
...
source directory.
llvm-svn: 73094
2009-06-08 22:44:26 +00:00
Daniel Dunbar
eed62b7c4b
Add stack alignment to x86_64 target data.
...
- <rdar://problem/6948443> WARNING: Linking two modules of different data
layouts!
llvm-svn: 73093
2009-06-08 22:39:13 +00:00