Commit Graph

88 Commits

Author SHA1 Message Date
Daniel Dunbar 2e8536cfaa Only intptr_t is protected by __intptr_t_defined.
llvm-svn: 67018
2009-03-15 03:16:47 +00:00
Chris Lattner 5a5194fec3 fix inverted conditional, rdar://6633188
llvm-svn: 65704
2009-02-28 18:53:33 +00:00
Daniel Dunbar 3283ff5088 Put compiler headers in <prefix>/lib/clang/1.0/include (vs
<prefix>/Headers, gross).

llvm-svn: 65247
2009-02-21 20:52:41 +00:00
Howard Hinnant 9c788c081c testing (reverted)
llvm-svn: 64991
2009-02-19 00:27:58 +00:00
Howard Hinnant 2d12fbdc2e testing
llvm-svn: 64990
2009-02-19 00:25:33 +00:00
Douglas Gregor ac3865c387 Remove pointless backslash
llvm-svn: 64965
2009-02-18 22:24:55 +00:00
Douglas Gregor c5c0488338 Add an unavailable __tg_promote function to attract incorrect uses of type-generic macros, rom Howard Hinnant.
llvm-svn: 64919
2009-02-18 17:23:05 +00:00
Chris Lattner abbd427cd0 initial reimplement tgmath.h, written by Howard Hinnant!
llvm-svn: 64826
2009-02-17 22:14:32 +00:00
Daniel Dunbar c9feeb54a5 Spell __always_inline__ correctly.
llvm-svn: 64757
2009-02-17 07:57:58 +00:00
Anders Carlsson b317efdf81 Add SSSE3 header
llvm-svn: 64735
2009-02-17 03:05:04 +00:00
Chris Lattner 325dec7343 remove dead macros
llvm-svn: 64725
2009-02-17 02:42:31 +00:00
Chris Lattner 2ca19c7ee7 explicitly cast integers to double. This a) silences any
possible future "data loss" warnings, and b) makes it intensely
obvious to the user what the impl of these functions do in a
ambiguity error.

llvm-svn: 64724
2009-02-17 02:41:36 +00:00
Chris Lattner 0021110773 asin support. No we don't care about complex int :)
llvm-svn: 64723
2009-02-17 02:37:35 +00:00
Chris Lattner dd0c64b102 hand macro expand this to make "candidate" set printing more useful. However,
Now no candidates are printed because the 'notes' are in a system header. :(

#include <tgmath-sofar.h>
 double foo2(short *x) {
  return acos(x);
}

t.c:10:10: error: no matching function for call to '__tg_acos'; candidates are:
  return acos(x);
         ^~~~
1 diagnostic generated.

llvm-svn: 64722
2009-02-17 02:30:54 +00:00
Chris Lattner bde5bd46b3 add support for integers to tgmath functions. I apparently need to provide
all the integer types other than char/short to avoid overload ambiguities.

llvm-svn: 64721
2009-02-17 02:22:33 +00:00
Chris Lattner 4e843feddc start converting over to attr(overloadable). Unfortunately, this
produces really horrible diagnostics when overload ambiguities
happen:

t.c:10:10: error: call to '__tg_acos' is ambiguous; candidates are:
  return acos(x);
         ^~~~
In file included from t.c:1:
/Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function
__TG_RC_1(x, acos, cacos)
^
/Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function
__TG_RC_1(x, acos, cacos)
^
/Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function
__TG_RC_1(x, acos, cacos)
^
/Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function
__TG_RC_1(x, acos, cacos)
^
/Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function
__TG_RC_1(x, acos, cacos)
^
/Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function
__TG_RC_1(x, acos, cacos)
^

A possible fix is to just not use macros for this, which I'll probably go for,
but it would be nice to emit the type at the call, so we know what we asked for!

llvm-svn: 64720
2009-02-17 02:14:31 +00:00
Mike Stump eff0cc98cf Fix 80col violations.
llvm-svn: 64559
2009-02-14 18:02:21 +00:00
Anders Carlsson 11352f9d63 Fix more xmmintrin.h typos
llvm-svn: 64537
2009-02-14 04:01:38 +00:00
Anders Carlsson 30c22d86e8 Fix an error in _mm_loaddup_pd that Eli noticed.
llvm-svn: 64522
2009-02-14 01:06:58 +00:00
Anders Carlsson 823c02eaab Add the nodebug attribute to intrinsics
llvm-svn: 64519
2009-02-14 01:00:11 +00:00
Chris Lattner 39bb0182bd anders johnson points out that some software depends on the
definition of __intptr_t_defined when stdint.h defines intptr_t.

llvm-svn: 64497
2009-02-13 22:43:13 +00:00
Chris Lattner 7e4c81c8c6 Give TargetInfo a new IntPtrType to hold the intptr_t type for
a target.

Make Preprocessor.cpp define a new __INTPTR_TYPE__ macro based on this.

On linux/32, set intptr_t to int, instead of long.  This fixes PR3563.

llvm-svn: 64495
2009-02-13 22:28:55 +00:00
Mike Stump 5b31ed3ff0 80col.
llvm-svn: 64450
2009-02-13 14:24:50 +00:00
Mike Stump 6b63074de9 Fix limits.h for linux, as glibc does a #include_next unless
_GCC_LIMITS_H_ is defined, when __GNUC__ is defined.

Also, we need to stay away from possible conflicts with header guards.
We should use CLANG_ to prefix all header guards.

llvm-svn: 64408
2009-02-12 23:06:31 +00:00
Anders Carlsson d0d8c540ca Add pmmintrin.h header.
llvm-svn: 64291
2009-02-11 06:39:50 +00:00
Anders Carlsson 5bc94e625b Fix some mistakes I made when I tried to decipher the Intel documentation of the MXCSR register
llvm-svn: 64290
2009-02-11 06:29:32 +00:00
Anders Carlsson 7325b61e74 Fix an #ifndef that should be an #ifdef instead.
llvm-svn: 64206
2009-02-10 06:18:19 +00:00
Chris Lattner 4293c8935a C++ really shouldn't check these #defines, thanks to Howard
for pointing this out!

llvm-svn: 64037
2009-02-07 22:21:31 +00:00
Chris Lattner 6726d42059 remove two eroneous suffixes, these promote to int. Thanks to Neil
for pointing this out.

llvm-svn: 64011
2009-02-07 08:49:37 +00:00
Chris Lattner 04441a10a5 add note, weirdness.
llvm-svn: 64010
2009-02-07 07:13:51 +00:00
Chris Lattner a7cc1267cf fix some missing parens, thanks for Eli's review!
Obviously I make a miserable header developer :)

llvm-svn: 64009
2009-02-07 06:42:04 +00:00
Chris Lattner 14bc3528f5 fix a typo that Sebastian noticed!
llvm-svn: 64008
2009-02-07 06:38:41 +00:00
Chris Lattner 5455db4273 make sure that UINTMAX_MAX has an unsigned type. This assumes that
uintmax_t is unsigned long long, which is not optimal, but is assumed 
elsewhere already.

llvm-svn: 64007
2009-02-07 06:38:06 +00:00
Chris Lattner 6bda45cec0 make various MAX/MIN constants be preprocessor constants, not C constants.
Thanks to Eli for pointing this out.

llvm-svn: 64006
2009-02-07 06:33:44 +00:00
Chris Lattner 19179ad680 start of tgmath, yuck.
llvm-svn: 63990
2009-02-07 00:47:29 +00:00
Chris Lattner 01af63beb4 Apparently it is important to define intptr_t and uintptr_t to
long instead of int.  This is because system heaers like to redefine
typedefs and that is an error if they don't exactly match.  Use long
for intptr_t on all systems where long is the right size.

llvm-svn: 63984
2009-02-07 00:23:17 +00:00
Sebastian Redl ad41b83816 Fix some errors in the new stdint.h.
llvm-svn: 63982
2009-02-06 23:57:52 +00:00
Chris Lattner 6fbf3a07bc only define MB_LEN_MAX if the system <limits.h> doesn't.
don't typecast CHAR_MIN to char, this makes it not a PP constant
and gives it the wrong unpromoted type.  Thanks to Sebastian for
pointing this out!

llvm-svn: 63980
2009-02-06 23:29:39 +00:00
Chris Lattner 404c2fb9cc add a stdint.h header.
llvm-svn: 63977
2009-02-06 22:59:47 +00:00
Chris Lattner 0b0cfbcb62 correct description
llvm-svn: 63947
2009-02-06 18:45:59 +00:00
Chris Lattner 1cee17aa5f first hack at limits.h
llvm-svn: 63945
2009-02-06 18:34:27 +00:00
Mike Stump f7444aa8df Avoid creating .dir files in the installation area.
llvm-svn: 62744
2009-01-22 02:53:03 +00:00
Anders Carlsson 43c2bab6d3 Fix more bugs I discovered
llvm-svn: 62656
2009-01-21 01:49:39 +00:00
Anders Carlsson 7322ea25a5 Fix some errors I noticed
llvm-svn: 62620
2009-01-20 21:51:44 +00:00
Anders Carlsson bfd47a3c00 Add mm_malloc.h, patch by Sam Weinig.
llvm-svn: 61954
2009-01-08 23:30:09 +00:00
Anders Carlsson f562b39e80 Add a MS specific intrinsic.
llvm-svn: 61446
2008-12-27 04:26:15 +00:00
Anders Carlsson a7e0e61b9d Eli noticed that I had forgotten some #defines. Add them.
llvm-svn: 61445
2008-12-26 22:49:10 +00:00
Anders Carlsson 70f8da06d3 Add float.h header. Eli, please review :)
llvm-svn: 61444
2008-12-26 17:10:18 +00:00
Anders Carlsson 88b53663fb Fix implementation of _mm_pause.
llvm-svn: 61441
2008-12-26 02:22:10 +00:00
Anders Carlsson 19ef5d49d4 OK, all tests pass. Let's start using the SSE2 header
llvm-svn: 61440
2008-12-26 00:57:11 +00:00