Chris Lattner
3eb172a02b
Teach sema and codegen about the difference between address of labels,
...
which is a common idiom to improve PIC'ness of code using the addr of
label extension. This implementation is a gross hack, but the only other
alternative would be to teach evalutate about this horrid combination.
While GCC allows things like "&&foo - &&bar + 1", people don't use this
in practice. This implements PR5131.
llvm-svn: 83957
2009-10-13 07:14:16 +00:00
Chris Lattner
9842a4dcb1
merge an indirect goto test into statements, add another
...
hairier (but nonsensical) example.
llvm-svn: 83951
2009-10-13 06:52:43 +00:00
Chris Lattner
f315471e24
fix PR4938 by recognizing % as a modifier on outputs,
...
previously we only recognized it on inputs.
llvm-svn: 83939
2009-10-13 04:32:07 +00:00
Devang Patel
232f278fc1
Disable tests that check debug info intrinsic. This does not work if debug info intrinsics are not used to encode debug info.
...
llvm-svn: 83929
2009-10-12 23:46:58 +00:00
Mike Stump
f8c1f0d1f0
Speed up testing by avoiding stdio.h, also helps testing on windows.
...
Patch by John Thompson.
llvm-svn: 83593
2009-10-08 23:05:06 +00:00
Mike Stump
03686660b1
In VC++, the *printf functions put an extra "0" in the exponent part
...
of a floating point number. This add regular expressions to account
for this. Patch by John Thompson.
llvm-svn: 83581
2009-10-08 21:57:41 +00:00
Mike Stump
c2eeac617d
Convert some tests to FileCheck to be more portable. Patch by John Thompson.
...
llvm-svn: 83578
2009-10-08 21:52:07 +00:00
Mike Stump
da6822f584
Add codegen for __builtin_abort. Convert to FileCheck.
...
llvm-svn: 83427
2009-10-06 22:58:45 +00:00
Chris Lattner
78a2e6356b
remove this test, grepping for define isn't really testing anything.
...
llvm-svn: 83325
2009-10-05 21:16:22 +00:00
Benjamin Kramer
80401b96c2
FileCheckize test case.
...
llvm-svn: 83244
2009-10-02 10:32:51 +00:00
Anders Carlsson
8a744ad8a6
Don't update the struct alignment when adding fields to a packed struct. Fixes PR5118.
...
llvm-svn: 83235
2009-10-02 04:52:12 +00:00
Anders Carlsson
39e3eb12ae
When building constant structs, check if the resulting LLVM struct will be bigger than the record layout size and use a packed struct if that's the case. Fixes PR5108.
...
llvm-svn: 83230
2009-10-02 02:15:20 +00:00
Douglas Gregor
3dc959f88b
Tweak CHECK lines to eliminate a failure on i686-apple-darwin10
...
llvm-svn: 83173
2009-09-30 21:39:51 +00:00
Chris Lattner
24440102aa
Convert from nonportable grep to filecheck, patch by John Thompson
...
llvm-svn: 83158
2009-09-30 19:55:07 +00:00
Anders Carlsson
e33eed5c1e
Set alignment on static function level decls and VLAs. Fixes PR5060.
...
llvm-svn: 82868
2009-09-26 18:16:06 +00:00
Daniel Dunbar
b3b1e53d33
Darwin/x86-32: Enumerated types and block pointer types in structures were not
...
handled correctly.
- <rdar://problem/7247671> Function arguments incorrect when function returns a
struct on i386 w/ llvm-g++ and clang
llvm-svn: 82681
2009-09-24 05:12:36 +00:00
Daniel Dunbar
1da76c4e58
Add ARM register names and aliases.
...
- Patch by Shantonu Sen!
<rdar://problem/6922650> clang doesn't know about ARM registers for inline asm clobber lists
llvm-svn: 82132
2009-09-17 07:03:19 +00:00
Daniel Dunbar
09d3362bf5
ARM/[A]APCS: Ignore empty records passed as arguments.
...
llvm-svn: 81798
2009-09-14 21:54:03 +00:00
Daniel Dunbar
ff0553ec61
Fix subtle bug in generating LLVM function declarations for builtin functions.
...
The decl wasn't being passed down, which meant that function attributes were not
being set correctly. This is particularly important for ARM, since it wants to
override the calling convention. Instead we would emit the builtin with the
wrong calling convention, and instcombine would come along and merrily shred all
the calls to it. :)
llvm-svn: 81756
2009-09-14 04:33:21 +00:00
Daniel Dunbar
d53bac7fa4
ARM/APCS: Don't treat structs w/ floating point types as "integer like".
...
llvm-svn: 81748
2009-09-14 02:20:34 +00:00
Daniel Dunbar
1ce7251a0a
Some minor clang/ARM/AAPCS tweaks.
...
llvm-svn: 81737
2009-09-14 00:56:55 +00:00
Daniel Dunbar
b4091a9c6a
Add TargetInfo::getABI(), and base ARM APCS vs AAPCS choice on that.
...
llvm-svn: 81735
2009-09-14 00:35:03 +00:00
Anders Carlsson
ccbabc9645
Fix another byref bug. This should hopefully get QuickLookPlugins building successfully.
...
llvm-svn: 81681
2009-09-13 17:55:13 +00:00
Daniel Dunbar
626f1d8c3a
ARM/APCS: Only "integer like" aggregates should be returned in r0 (following
...
gcc's interpretation of APCS' somewhat loose specification).
llvm-svn: 81671
2009-09-13 08:03:58 +00:00
Douglas Gregor
299d76e901
Rework the way we determine whether an externally visible symbol is
...
generated for an inline function definition, taking into account C99
and GNU inline/extern inline semantics. This solution is simpler,
cleaner, and fixes PR4536.
llvm-svn: 81670
2009-09-13 07:46:26 +00:00
Daniel Dunbar
0482cfd790
Don't use the PredefinedExpr string as the global variable name, these don't
...
make very nice symbols, just use the function name.
llvm-svn: 81653
2009-09-12 23:06:21 +00:00
Anders Carlsson
f8e94f2008
Add support for __block variables with alignment greater than __alignof(void *).
...
llvm-svn: 81602
2009-09-12 02:44:18 +00:00
Daniel Dunbar
020daa9476
Stub out room for ARM APCS ABI implementation (and AAPCS_VFP, although you can't
...
hit this via command line options yet).
llvm-svn: 81595
2009-09-12 01:00:39 +00:00
Dan Gohman
0533ffa2a6
Update this test to expect the "inbounds" keyword, which LLVM's constant
...
folder is now automatically adding.
llvm-svn: 81491
2009-09-11 00:27:06 +00:00
Anders Carlsson
10f2c10b83
Make the forwarding member of block byref structs be a pointer to the block byref struct itself.
...
llvm-svn: 81423
2009-09-10 01:32:12 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Chris Lattner
6426345b8f
convert this to filecheck, hopefully it will fix PR4888. If nothing
...
else it will make tests run faster and make 4888 easier to diagnose.
llvm-svn: 81238
2009-09-08 18:43:45 +00:00
Anders Carlsson
2fb0824197
Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam Weinig!
...
llvm-svn: 81237
2009-09-08 18:24:21 +00:00
Anders Carlsson
0e91275ab4
If the alignment of the chosen field in a union is greater than the alignment of the union, we need to use a packed LLVM struct. Fixes <rdar://problem/7184250>.
...
llvm-svn: 80964
2009-09-03 22:56:02 +00:00
Anders Carlsson
09a3774cd3
Packed unions should be packed. Fixes an assert Daniel reported.
...
llvm-svn: 80808
2009-09-02 17:51:33 +00:00
Eli Friedman
1c277d0fe8
PR4836, part 2: CodeGen for __builtin_isnan.
...
llvm-svn: 80655
2009-09-01 04:19:44 +00:00
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