| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
miscompiling.
llvm-svn: 64647
|
| |
|
|
|
|
| |
creating valid LLVM structures (although they work fined).
llvm-svn: 64580
|
| |
|
|
|
|
| |
Thanks Anders.
llvm-svn: 64571
|
| |
|
|
|
|
| |
starting to work for blocks.
llvm-svn: 64570
|
| |
|
|
|
|
|
| |
Now we are pretty close to be in sync with objc's classic
abi when it comes to passing dejagnu objc executable tests.
llvm-svn: 64569
|
| |
|
|
|
|
|
|
| |
which consequently caused a Seg fault. during meta-data
generation. It also addresses an issue related to
late binding of newly synthesize ivars (when we support it).
llvm-svn: 64563
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
about, whether they are builtins or not. Use this to add the
appropriate "format" attribute to NSLog, NSLogv, asprintf, and
vasprintf, and to translate builtin attributes (from Builtins.def)
into actual attributes on the function declaration.
Use the "printf" format attribute on function declarations to
determine whether we should do format string checking, rather than
looking at an ad hoc list of builtins and "known" function names.
Be a bit more careful about when we consider a function a "builtin" in
C++.
llvm-svn: 64561
|
| |
|
|
|
|
| |
ASTContext types.
llvm-svn: 64533
|
| |
|
|
|
|
|
| |
important for both keeping the generated LLVM simple and for ensuring
that integer types are passed/promoted correctly.
llvm-svn: 64529
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
missing-?:-true-value extension.
llvm-svn: 64505
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 64502
|
| |
|
|
| |
llvm-svn: 64500
|
| |
|
|
|
|
| |
- PR3566
llvm-svn: 64492
|
| |
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
| |
for attribute used support.
- No functionality change.
llvm-svn: 64487
|
| |
|
|
| |
llvm-svn: 64486
|
| |
|
|
| |
llvm-svn: 64482
|
| |
|
|
| |
llvm-svn: 64481
|
| |
|
|
| |
llvm-svn: 64479
|
| |
|
|
| |
llvm-svn: 64476
|
| |
|
|
| |
llvm-svn: 64475
|
| |
|
|
| |
llvm-svn: 64473
|
| |
|
|
|
|
| |
implementation with no category declaration!
llvm-svn: 64470
|
| |
|
|
|
|
| |
- Now at 1274 passes on gcc compat suite vs 1262.
llvm-svn: 64469
|
| |
|
|
| |
llvm-svn: 64461
|
| |
|
|
| |
llvm-svn: 64459
|
| |
|
|
| |
llvm-svn: 64458
|
| |
|
|
| |
llvm-svn: 64457
|
| |
|
|
| |
llvm-svn: 64456
|
| |
|
|
| |
llvm-svn: 64455
|
| |
|
|
| |
llvm-svn: 64454
|
| |
|
|
| |
llvm-svn: 64452
|
| |
|
|
| |
llvm-svn: 64451
|
| |
|
|
| |
llvm-svn: 64445
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently only used for 128-bit integers.
Note that we can't use the fixed-width integer types for other integer
modes without other changes because glibc headers redefines (u)int*_t
and friends using the mode attribute. For example, this means that uint64_t
has to be compatible with unsigned __attribute((mode(DI))), and
uint64_t is currently defined to long long. And I have a feeling we'll
run into issues if we try to define uint64_t as something which isn't
either long or long long.
This doesn't get the alignment right in most cases, including
the 128-bit integer case; I'll file a PR shortly. The gist of the issue
is that the targets don't really expose the information necessary to
figure out the alignment outside of the target description, so there's a
non-trivial amount of work involved in getting it working right. That
said, the alignment used is conservative, so the only issue with the
current implementation is ABI compatibility.
This makes it trivial to add some sort of "bitwidth" attribute to make
arbitrary-width integers; I'll do that in a followup.
We could also use this for stuff like the following for compatibility
with gcc, but I have a feeling it would be a better idea for clang to be
consistent between C and C++ modes rather than follow gcc's example for
C mode.
struct {unsigned long long x : 33;} x;
unsigned long long a(void) {return x.x+1;}
llvm-svn: 64434
|
| |
|
|
| |
llvm-svn: 64425
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 64411
|
| |
|
|
|
|
| |
to a base class (nonfragile abi ir gen bug).
llvm-svn: 64391
|
| |
|
|
|
|
|
|
| |
tried to put FIXMEs on the most important things to fix up. Lots left
to do including more codegen, more documentation and cleaning code and
style cleanups.
llvm-svn: 64390
|
| |
|
|
| |
llvm-svn: 64387
|
| |
|
|
|
|
|
|
| |
- rename isObjCIdType/isObjCClassType -> isObjCIdStructType/isObjCClassStructType. The previous name didn't do what you would expect.
- add back isObjCIdType/isObjCClassType to do what you would expect. Not currently used, however many of the isObjCIdStructType/isObjCClassStructType clients could be converted over time.
- move static Sema function areComparableObjCInterfaces to ASTContext (renamed to areComparableObjCPointerTypes, since it now operates on pointer types).
llvm-svn: 64385
|
| |
|
|
| |
llvm-svn: 64380
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Doesn't yet handle case where values are passed in mixed (general
purpose & floating point) registers; otherwise largely
functional. Code still needs some cleaning.
Fixes:
MultiSource/Applications/lua/lua
MultiSource/Applications/siod/siod
MultiSource/Applications/sqlite3/sqlite3
SingleSource/Regression/C/PR640
SingleSource/UnitTests/2003-07-09-SignedArgs
SingleSource/UnitTests/2007-03-02-VaCopy
gcc compat test suite results (Darwin x86-32 & -64):
--
# of expected passes 1262
# of unexpected failures 56
# of unresolved testcases 34
# of unsupported tests 2
Compare to: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090209/012050.html
llvm-svn: 64370
|
| |
|
|
| |
llvm-svn: 64346
|
| |
|
|
|
|
| |
case on x86_64.
llvm-svn: 64333
|
| |
|
|
| |
llvm-svn: 64325
|
| |
|
|
| |
llvm-svn: 64323
|