Daniel Dunbar
3e7a723fef
Factor Windows target into VS, MinGW and Cygwin variants.
...
- Patch by John Thompson!
llvm-svn: 82621
2009-09-23 07:31:35 +00:00
Chris Lattner
d545ad1301
implement support for __builtin_eh_return_data_regno on x86-32 and x86-64.
...
This implements PR5034 and rdar://6836445.
llvm-svn: 82614
2009-09-23 06:06:36 +00:00
Daniel Dunbar
03184798c3
Reconcile Clang/ARM target data string with llvm-gcc (module eabi weirdness).
...
llvm-svn: 82578
2009-09-22 21:44:58 +00:00
Mike Stump
faacf018a3
Fix typo.
...
llvm-svn: 82164
2009-09-17 21:15:00 +00:00
Daniel Dunbar
2f5c75e17d
ARM: Incremental improvement to preprocessor defines.
...
- Based on patch by Shantonu.
llvm-svn: 82147
2009-09-17 16:21:10 +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
Chris Lattner
f7ff53d4d9
fix some ppc register name issues, patch by Richard Pennington!
...
llvm-svn: 82009
2009-09-16 05:05:27 +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
Daniel Dunbar
125f8fb761
ARM target tweaks.
...
- Change TargetData string to match llvm-gcc.
- Some -target-abi support for 'apcs-gnu', most importantly the alignment of double and long long changes.
llvm-svn: 81732
2009-09-14 00:02:24 +00:00
Daniel Dunbar
33a004e9eb
Swizzle the target triple based on -mthumb, and update clang-cc to recognize
...
thumb-foo-bar as an ARM target.
llvm-svn: 81497
2009-09-11 01:14:50 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Daniel Dunbar
a77eaeb1e6
Add basic support for -pthread.
...
- Patch by David Chisnall, with PCH and Darwin support mixed in.
llvm-svn: 80883
2009-09-03 04:54:28 +00:00
Daniel Dunbar
576d90d39b
Remove TargetInfo::getTargetPrefix().
...
llvm-svn: 79907
2009-08-24 09:54:37 +00:00
Daniel Dunbar
40165180f7
Switch TargetInfo to store an llvm::Triple.
...
- Primarily to discourage clients form making decisions based on the string.
llvm-svn: 79901
2009-08-24 09:10:05 +00:00
Sanjiv Gupta
b841d1baa1
Issue an error if the user specifies parameters in a function marked as ISR.
...
llvm-svn: 79544
2009-08-20 17:48:52 +00:00
Eli Friedman
a9c3d71b59
Add TCE target to clang; patch by Mikael Lepistö.
...
llvm-svn: 79462
2009-08-19 20:47:07 +00:00
Daniel Dunbar
58bc48c14e
Switch to SmallString::str from SmallString::c_str.
...
- Several FIXMEs due to non-Twinification of IRBuilder.
llvm-svn: 79455
2009-08-19 20:04:03 +00:00
Daniel Dunbar
5232203234
Convert CreateTargetInfo to use a Triple instead of manul string munging.
...
- Patch by Yonggang Luo (with some formatting tweaks by Eli and myself).
llvm-svn: 79320
2009-08-18 05:47:58 +00:00
Jakob Stoklund Olesen
0de52f906d
Support compilation for the blackfin back-end
...
llvm-svn: 79271
2009-08-17 20:08:44 +00:00
Chris Lattner
859c37a5d9
use the new llvm::Triple parsing stuffola for handling darwin version #'s.
...
llvm-svn: 78794
2009-08-12 06:24:27 +00:00
Chris Lattner
30ba674391
fix a couple of problems with section attributes:
...
1. Passing something that isn't a string used to cause:
"argument to annotate attribute was not a string literal"
make it say "section attribute" instead.
2. Fix the location of the above message to point to the
bad argument instead of the section token.
3. Implement rdar://4341926, by diagnosing invalid section
specifiers in the frontend rather than letting them slip all
the way to the assembler (a QoI win).
An example of #3 is that we used to produce something like this:
/var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Expected comma after segment-name
/var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Rest of line ignored. 1st junk character valued 46 (.).
Daniel improved clang to use llvm_report_error, so now we got:
$ clang t.c -c
fatal error: error in backend: Global variable 'x' has an invalid section specifier 'sadf': mach-o section specifier
requires a segment and section separated by a comma.
with no loc info. Now we get:
$ clang t.c -fsyntax-only
t.c:4:30: error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment
and section separated by a comma
int x __attribute__((section("sadf")));
^
which is nice :)
llvm-svn: 78586
2009-08-10 19:03:04 +00:00
Mike Stump
b0dd95d6d3
Add armv7 support.
...
llvm-svn: 78092
2009-08-04 19:48:52 +00:00
Anton Korobeynikov
b5b703b2f7
Hook in s390x stuff into clang
...
llvm-svn: 76099
2009-07-16 20:09:57 +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
d1d820ed51
add netbsd support, patch by Krister Kalfridsson!
...
llvm-svn: 75492
2009-07-13 20:29:08 +00:00
Duncan Sands
9cb27e9c08
Correct FreeBSD target info, fixing PR4514.
...
Patch by Roman Divacky.
llvm-svn: 75003
2009-07-08 13:55:08 +00:00
Sanjiv Gupta
30f95ec27d
pic16 preproc defs.
...
llvm-svn: 74893
2009-07-07 04:42:23 +00:00
Eli Friedman
245f229df4
More tweaks to types for OpenBSD. Patch by Jonathan Gray.
...
llvm-svn: 74805
2009-07-05 22:31:18 +00:00
Eli Friedman
e3aa454e2f
Per PR4506, fix the type of size_t on OpenBSD.
...
llvm-svn: 74795
2009-07-05 18:47:56 +00:00
Eli Friedman
fb36b02591
Add an intermediate typedef for __builtin_va_tag to make it a bit easier
...
to deal with for AST pretty-printing/rewriting. Patch by Abramo
Bagnara.
llvm-svn: 74752
2009-07-03 00:45:06 +00:00
Douglas Gregor
c05d2a11d7
Two fixes to make Clang build on Visual C++ (again), from Alisdair Meredith.
...
llvm-svn: 74606
2009-07-01 15:12:53 +00:00
Eli Friedman
2857ccbaa7
Fix for PR4192: fix the definition of int64_t on x86_64 Linux.
...
Note that I'm guessing that *BSD and Solaris do the same thing as Linux
here, but it's quite possible I'm wrong; if the following testcase
gives an error on x86-64 with gcc for any of those operating systems, please
tell me:
#include <stdint.h>
int64_t x; long x;
llvm-svn: 74583
2009-07-01 03:36:11 +00:00
Torok Edwin
b2b37c62d0
Reapply r74532, and inherit from OSTargetInfo instead of from Target.
...
'make test' passes now.
llvm-svn: 74539
2009-06-30 17:10:35 +00:00
Torok Edwin
4e0541649b
Revert 74532 till I figure out why it breaks a bunch of tests.
...
llvm-svn: 74536
2009-06-30 17:00:25 +00:00
Torok Edwin
45d60b5bc3
Use templates instead of creating a new class for each OS/Target combination.
...
This unifies all the targets supported by an OS into a template.
It also cleans up the differences between the darwin targets.
Also __LP64__ wasn't needed for *BSD, since x86-64 target defines it anyway.
llvm-svn: 74532
2009-06-30 16:30:17 +00:00
Daniel Dunbar
86e35b3aba
Use true/false instead of 1/0.
...
llvm-svn: 74479
2009-06-29 23:58:47 +00:00
Daniel Dunbar
302ab13b1a
Don't define __KPRINTF_ATTRIBUTE__ unconditionally on OpenBSD.
...
llvm-svn: 74467
2009-06-29 22:45:37 +00:00
Daniel Dunbar
10de9e6602
OpenBSD support.
...
- Patch by Jonathan Gray!
llvm-svn: 74453
2009-06-29 20:52:51 +00:00
Bill Wendling
1835107ed0
Make the StackProtector bitfield use enums instead of obscure numbers.
...
llvm-svn: 74414
2009-06-28 23:01:01 +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
Chris Lattner
46be2e1557
fix the type of wchar_t for windows, PR4417
...
llvm-svn: 74083
2009-06-24 17:12:15 +00:00
Chris Lattner
2fe5b26414
__APPLE_CC__ should only be set when building for darwin targets.
...
llvm-svn: 73934
2009-06-23 00:43:21 +00:00
Chris Lattner
5abdec7978
move the various builtins stuff from libast to libbasic. This
...
fixes a layering violation in lib/Basic/Targets.cpp.
llvm-svn: 73318
2009-06-14 01:05:48 +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
Eli Friedman
ebb9e4dc4d
Minor tweaks to the Windows target.
...
llvm-svn: 73083
2009-06-08 21:16:17 +00:00
Eli Friedman
cf432d3c7b
PR4346: add "R" asm register constraint.
...
llvm-svn: 73081
2009-06-08 20:45:44 +00:00
Eli Friedman
aa27a87ab3
Misc minor fixes for clang for the Windows target.
...
llvm-svn: 73050
2009-06-08 06:11:14 +00:00
Eli Friedman
9ffd4a9b96
Move CharIsSigned from TargetInfo to LangOptions.
...
llvm-svn: 72928
2009-06-05 07:05:05 +00:00
Eli Friedman
fd4b1559db
Move a couple Darwin-specific defines into getDarwinDefines.
...
llvm-svn: 72900
2009-06-04 23:00:29 +00:00
Eli Friedman
3d2c8fd3a6
Back out r72764; I should have looked more carefully before committing
...
this. The correct replacement for "Y" and "Yt" is "x".
llvm-svn: 72765
2009-06-03 10:41:42 +00:00