#
d42c29f9 |
| 26-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix some sema problems with wide strings and hook up basic codegen for them.
llvm-svn: 65582
|
#
d7e7b8e4 |
| 24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
first wave of fixes for @encode sema support. This is part of PR3648.
The big difference here is that (like string literal) @encode has array type, not pointer type.
llvm-svn: 65391
|
#
3c81dabd |
| 21-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Emit extern_weak when needed. - PR3629.
llvm-svn: 65203
|
#
719ed1a9 |
| 20-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Initialize the Init variable to something reasonable when we emit an error, so we don't crash.
llvm-svn: 65099
|
#
f96954ca |
| 19-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Add irgen support for the noinline attribute.
llvm-svn: 65056
|
#
f0acf7bd |
| 19-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Don't emit K&R unprototyped function definitions as varargs. - <rdar://problem/6584606> clang/x86-64 - too many reg saves
llvm-svn: 65032
|
#
b2f4cdb2 |
| 19-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Emission of global variable initialializer was broken in rare situation where a tentative decl was emitted *after* the actual initialization. This occurs in some rare situations with static decls. -
Emission of global variable initialializer was broken in rare situation where a tentative decl was emitted *after* the actual initialization. This occurs in some rare situations with static decls. - PR3613.
- I'm not particularly happy with this fix, but I don't see a simpler or more elegant solution yet.
llvm-svn: 65018
show more ...
|
#
5f361c9f |
| 18-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Address Chris's comments regarding C++ name mangling.
llvm-svn: 64984
|
#
a228a676 |
| 18-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add anti-FIXME.
llvm-svn: 64969
|
#
216f6437 |
| 18-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Simplify.
llvm-svn: 64944
|
#
538c3d84 |
| 14-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Make it possible for builtins to expression FILE* arguments, so that we can define builtins such as fprintf, vfprintf, and __builtin___fprintf_chk. Give a nice error message when we need to implicitl
Make it possible for builtins to expression FILE* arguments, so that we can define builtins such as fprintf, vfprintf, and __builtin___fprintf_chk. Give a nice error message when we need to implicitly declare a function like fprintf.
llvm-svn: 64526
show more ...
|
#
b9063fc1 |
| 13-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Implicitly declare certain C library functions (malloc, strcpy, memmove, etc.) when we perform name lookup on them. This ensures that we produce the correct signature for these functions, which has t
Implicitly declare certain C library functions (malloc, strcpy, memmove, etc.) when we perform name lookup on them. This ensures that we produce the correct signature for these functions, which has two practical impacts:
1) When we're supporting the "implicit function declaration" feature of C99, these functions will be implicitly declared with the right signature rather than as a function returning "int" with no prototype. See PR3541 for the reason why this is important (hint: GCC always predeclares these functions). 2) If users attempt to redeclare one of these library functions with an incompatible signature, we produce a hard error.
This patch does a little bit of work to give reasonable error messages. For example, when we hit case #1 we complain that we're implicitly declaring this function with a specific signature, and then we give a note that asks the user to include the appropriate header (e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In case #2, we show the type of the implicit builtin that was incorrectly declared, so the user can see the problem. We could do better here: for example, when displaying this latter error message we say something like:
'strcpy' was implicitly declared here with type 'char *(char *, char const *)'
but we should really print out a fake code line showing the declaration, like this:
'strcpy' was implicitly declared here as:
char *strcpy(char *, char const *)
This would also be good for printing built-in candidates with C++ operator overloading.
The set of C library functions supported by this patch includes all functions from the C99 specification's <stdlib.h> and <string.h> that (a) are predefined by GCC and (b) have signatures that could cause codegen issues if they are treated as functions with no prototype returning and int. Future work could extend this set of functions to other C library functions that we know about.
llvm-svn: 64504
show more ...
|
#
5db3ef6f |
| 13-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Simplify predicate.
llvm-svn: 64500
|
#
128a138a |
| 13-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
IRgen support for attribute used. - PR3566
llvm-svn: 64492
|
#
6b8720e7 |
| 13-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Pull MayDeferGeneration out of EmitGlobal. - Fix emission of static functions with constructor attribute while I was here. <rdar://problem/6140899> [codegen] "static" and attribute-constructor in
Pull MayDeferGeneration out of EmitGlobal. - Fix emission of static functions with constructor attribute while I was here. <rdar://problem/6140899> [codegen] "static" and attribute-constructor interact poorly
llvm-svn: 64488
show more ...
|
#
08b26a05 |
| 13-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Rename EmitStatics (etc) to EmitDeferred; provide basic infrastructure for attribute used support. - No functionality change.
llvm-svn: 64487
|
#
499ae7ec |
| 13-Feb-2009 |
Mike Stump <mrs@apple.com> |
Let the backend unique these.
llvm-svn: 64486
|
#
2c867aec |
| 13-Feb-2009 |
Mike Stump <mrs@apple.com> |
Move DescriptorUniqueCount into CGM.
llvm-svn: 64481
|
#
9319db8a |
| 13-Feb-2009 |
Mike Stump <mrs@apple.com> |
Move GlobalUniqueCount up into CGM.
llvm-svn: 64473
|
#
005c9a62 |
| 13-Feb-2009 |
Mike Stump <mrs@apple.com> |
Move GenericBlockLiteralType into CGM.
llvm-svn: 64452
|
#
650c932d |
| 13-Feb-2009 |
Mike Stump <mrs@apple.com> |
Move BlockDescriptorType into CGM.
llvm-svn: 64451
|
#
5fec5b04 |
| 13-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Add basic support for C++ name mangling according to the Itanium C++ ABI to the CodeGen library. Since C++ code-generation is so incomplete, we can't exercise much of this mangling code. However, a f
Add basic support for C++ name mangling according to the Itanium C++ ABI to the CodeGen library. Since C++ code-generation is so incomplete, we can't exercise much of this mangling code. However, a few smoke tests show that it's doing the same thing as GCC. When C++ codegen matures, we'll extend the ABI tester to verify name-mangling as well, and complete the implementation here.
At this point, the major client of name mangling is in the uses of the new "overloadable" attribute in C, which allows overloading. Any "overloadable" function in C (or in an extern "C" block in C++) will be mangled the same way that the corresponding C++ function would be mangled.
llvm-svn: 64413
show more ...
|
#
6a60fa24 |
| 12-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Add a very basic implemenation of global blocks. This needs to be cleaned up.
llvm-svn: 64387
|
#
648bf783 |
| 12-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Support __attribute__(section(<name>))
llvm-svn: 64380
|
#
fe2fb0af |
| 06-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Use 'compile' instead of 'codegen' when reporting error to user.
llvm-svn: 63952
|