Commit Graph

4 Commits

Author SHA1 Message Date
Steve Naroff 6fbf0dcb6e Bug #:
Submitted by:
Reviewed by:
carbon.h looking good! Only 1 warning left...no parse errors!

This fixes 3 bugs...
- A couple tricky bugs with type canonicalization. Nested typedef's  weren't being
handled properly. For example, the following didn't work:

typdef int __darwin_pid_t;
typedef __darwin_pid_t pid_t;

int getpgid(pid_t);
int getpgid(int);

- The storage class wasn't being preserved. As a result, Sema was complaining
about the  following:

extern char *foo;
char *foo;

- various built-ins weren't registered...resulting in spurious warnings.

llvm-svn: 39357
2007-03-16 00:33:25 +00:00
Chris Lattner f82a33b487 add 3 apple-local intrinsics.
llvm-svn: 39330
2007-01-30 05:47:29 +00:00
Chris Lattner 83f1881702 Stub out the i386 SSE builtins, this eliminates nearly 300 warnings parsing
carbon.h on intel, bringing the total to 257.

llvm-svn: 39329
2007-01-30 05:34:20 +00:00
Chris Lattner 10a5b387cc Add support for target-specific builtins, including detecting nonportability
of source code.  For example:

$ clang INPUTS/carbon_h.c -arch i386 -arch ppc
prints:
...
/usr/lib/gcc/i686-apple-darwin8/4.0.1/include/mmintrin.h:51:3: note: use of a target-specific builtin function, source is not 'portable'
  __builtin_ia32_emms ();
  ^

because carbon.h pulls in xmmintrin.h, and __builtin_ia32_emms isn't a builtin on ppc.

Though clang now supports target-specific builtins, the full table isn't implemented yet.

llvm-svn: 39328
2007-01-29 05:24:35 +00:00