]> granicus.if.org Git - clang/log
clang
16 years agoFixed a parsing bug whereby @optional/@required keyword is not followed by
Fariborz Jahanian [Tue, 11 Dec 2007 18:34:51 +0000 (18:34 +0000)]
Fixed a parsing bug whereby @optional/@required keyword is not followed by
a method declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44870 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomention pork
Chris Lattner [Tue, 11 Dec 2007 07:59:50 +0000 (07:59 +0000)]
mention pork

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44857 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoproperly namespacify.
Chris Lattner [Tue, 11 Dec 2007 04:36:28 +0000 (04:36 +0000)]
properly namespacify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44845 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix a build issue with non-apple-gcc-4.0 compilers.
Chris Lattner [Tue, 11 Dec 2007 04:33:00 +0000 (04:33 +0000)]
fix a build issue with non-apple-gcc-4.0 compilers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44844 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAvoid the first person in a recently added comment.
Steve Naroff [Tue, 11 Dec 2007 03:38:03 +0000 (03:38 +0000)]
Avoid the first person in a recently added comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44843 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago- Tweak several tests to be compatible with my last commit.
Steve Naroff [Tue, 11 Dec 2007 03:34:41 +0000 (03:34 +0000)]
- Tweak several tests to be compatible with my last commit.
- Add a test to message.m for an unusual case for GCC compat (as suggested by Chris).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44842 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoGenerate more builtins.
Anders Carlsson [Tue, 11 Dec 2007 03:09:22 +0000 (03:09 +0000)]
Generate more builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44841 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoChange err_undef_protocolref to warn_undef_protocolref (this is consistent with GCC).
Steve Naroff [Tue, 11 Dec 2007 02:44:30 +0000 (02:44 +0000)]
Change err_undef_protocolref to warn_undef_protocolref (this is consistent with GCC).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44840 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoGenerate code for some more intrinsics.
Anders Carlsson [Tue, 11 Dec 2007 02:25:54 +0000 (02:25 +0000)]
Generate code for some more intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44839 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReimplement support for strings that initialize global inits now that
Chris Lattner [Tue, 11 Dec 2007 01:38:45 +0000 (01:38 +0000)]
Reimplement support for strings that initialize global inits now that
the types are right in sema.  Thanks Steve.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44834 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSeparate access field number is not required.
Devang Patel [Tue, 11 Dec 2007 01:23:33 +0000 (01:23 +0000)]
Separate access field number is not required.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44833 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoBeautify comment.
Devang Patel [Tue, 11 Dec 2007 00:54:19 +0000 (00:54 +0000)]
Beautify comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44831 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd support to share llvm fields for bit-fields.
Devang Patel [Tue, 11 Dec 2007 00:49:18 +0000 (00:49 +0000)]
Add support to share llvm fields for bit-fields.
For example, struct { char a; short b:2; };

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44830 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoExplicitly set the string literal type from "char *" to "constant array of char".
Steve Naroff [Tue, 11 Dec 2007 00:00:01 +0000 (00:00 +0000)]
Explicitly set the string literal type from "char *" to "constant array of char".

At this point, I am fairly certain the front-end is correct. Unfortunately, the back-end is still unhappy.

That said, I've commented out the two lines in globalinit.c that are causing problems.

Chris, please have a look...thanks!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44823 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed bug in CFG::PopulateBlkExprMap where the ordering
Ted Kremenek [Mon, 10 Dec 2007 23:58:39 +0000 (23:58 +0000)]
Fixed bug in CFG::PopulateBlkExprMap where the ordering
between fetching the size of the expression map (for use as
the next integer id for an Expr*) and the creation of the
entry in the map could be non-deterministic.  This could
cause the size of the map to be incremented prior to the
index being determine.

On Linux the map entry would be created first, causing the
map to the "size" to be incremented prior to it being
queried. On Mac OS X we had the reverse behavior. Now the
size is always queried prior to the new id being inserted
into the map.

This was the real cause of the bit-overrun triggered in
PR 1847:

  http://llvm.org/bugs/show_bug.cgi?id=1847

Also reverted the change in patch 44813, which was a bogus
fix to this problem:

  http://llvm.org/viewvc/llvm-project?rev=44813&view=rev

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44822 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded missing inclusion of stdarg.h. Now CGExprScalar.cpp
Ted Kremenek [Mon, 10 Dec 2007 23:44:32 +0000 (23:44 +0000)]
Added missing inclusion of stdarg.h. Now CGExprScalar.cpp
compiles again on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44821 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd support for initializing char arrays from string literals.
Steve Naroff [Mon, 10 Dec 2007 22:44:33 +0000 (22:44 +0000)]
Add support for initializing char arrays from string literals.

Adapted from a patch by Anders Carlsson.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44816 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixed off-by-one-error when resizing Bitvectors used for
Ted Kremenek [Mon, 10 Dec 2007 22:01:22 +0000 (22:01 +0000)]
Fixed off-by-one-error when resizing Bitvectors used for
dataflow analysis over expressions and decls.

This should fix bug 1847:

http://llvm.org/bugs/show_bug.cgi?id=1847

Thanks to Török Edwin for providing a test case that
identified the problem.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44813 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd support for implicit cast from array to pointer that is not the element
Chris Lattner [Mon, 10 Dec 2007 19:50:32 +0000 (19:50 +0000)]
add support for implicit cast from array to pointer that is not the element
type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44809 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRevert change that broke the build.
Anders Carlsson [Mon, 10 Dec 2007 19:46:20 +0000 (19:46 +0000)]
Revert change that broke the build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44808 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agodisable case that makes this fail.
Chris Lattner [Mon, 10 Dec 2007 19:44:50 +0000 (19:44 +0000)]
disable case that makes this fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44807 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd EmitShuffleVector helper method.
Anders Carlsson [Mon, 10 Dec 2007 19:35:18 +0000 (19:35 +0000)]
Add EmitShuffleVector helper method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44806 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAddress comments from Chris.
Anders Carlsson [Mon, 10 Dec 2007 19:30:18 +0000 (19:30 +0000)]
Address comments from Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44804 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agominor edits.
Chris Lattner [Mon, 10 Dec 2007 18:56:37 +0000 (18:56 +0000)]
minor edits.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44801 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd assert to flag incomplete bit-field support.
Devang Patel [Mon, 10 Dec 2007 18:52:06 +0000 (18:52 +0000)]
Add assert to flag incomplete bit-field support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44800 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.
Devang Patel [Mon, 10 Dec 2007 18:37:40 +0000 (18:37 +0000)]
Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44799 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.
Devang Patel [Mon, 10 Dec 2007 18:25:34 +0000 (18:25 +0000)]
Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44798 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded newline to end of file.
Ted Kremenek [Mon, 10 Dec 2007 18:01:25 +0000 (18:01 +0000)]
Added newline to end of file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44797 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agobe more clear about what we are comparing.
Chris Lattner [Mon, 10 Dec 2007 17:38:50 +0000 (17:38 +0000)]
be more clear about what we are comparing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44795 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoForgot this file.
Anders Carlsson [Mon, 10 Dec 2007 08:48:18 +0000 (08:48 +0000)]
Forgot this file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44790 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofixes, thanks to Nico Weber
Chris Lattner [Mon, 10 Dec 2007 08:21:12 +0000 (08:21 +0000)]
fixes, thanks to Nico Weber

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44789 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoclean up the TOC.
Chris Lattner [Mon, 10 Dec 2007 08:19:29 +0000 (08:19 +0000)]
clean up the TOC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44788 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofinish the features description.
Chris Lattner [Mon, 10 Dec 2007 08:12:49 +0000 (08:12 +0000)]
finish the features description.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44787 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agonow with hackability.
Chris Lattner [Mon, 10 Dec 2007 07:23:52 +0000 (07:23 +0000)]
now with hackability.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44784 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoreorganize features, expound on a couple more.
Chris Lattner [Mon, 10 Dec 2007 07:14:08 +0000 (07:14 +0000)]
reorganize features, expound on a couple more.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44783 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoincorporate suggestions from Joel Nelson.
Chris Lattner [Mon, 10 Dec 2007 06:01:32 +0000 (06:01 +0000)]
incorporate suggestions from Joel Nelson.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44782 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agostart making features be a more detailed description of the features/goals section...
Chris Lattner [Mon, 10 Dec 2007 05:52:05 +0000 (05:52 +0000)]
start making features be a more detailed description of the features/goals section on the main page.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44781 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd toc
Chris Lattner [Mon, 10 Dec 2007 05:23:01 +0000 (05:23 +0000)]
add toc

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44780 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agodon't duplicate goals on the features page.
Chris Lattner [Mon, 10 Dec 2007 05:20:47 +0000 (05:20 +0000)]
don't duplicate goals on the features page.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44779 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoupdate status
Chris Lattner [Mon, 10 Dec 2007 05:11:40 +0000 (05:11 +0000)]
update status

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44778 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoedits, switch the goals/why section.
Chris Lattner [Mon, 10 Dec 2007 05:10:14 +0000 (05:10 +0000)]
edits, switch the goals/why section.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44777 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agominor edits
Chris Lattner [Mon, 10 Dec 2007 05:06:15 +0000 (05:06 +0000)]
minor edits

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44776 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd link to comparison page.
Chris Lattner [Mon, 10 Dec 2007 02:25:51 +0000 (02:25 +0000)]
add link to comparison page.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44763 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoBe more positive! Add to sidebar.
Chris Lattner [Mon, 10 Dec 2007 02:24:44 +0000 (02:24 +0000)]
Be more positive!  Add to sidebar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44762 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoupdates.
Chris Lattner [Mon, 10 Dec 2007 02:18:15 +0000 (02:18 +0000)]
updates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44761 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agominor edits
Chris Lattner [Mon, 10 Dec 2007 02:05:32 +0000 (02:05 +0000)]
minor edits

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44759 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomake more positive.
Chris Lattner [Mon, 10 Dec 2007 01:52:24 +0000 (01:52 +0000)]
make more positive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44758 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a "comparing clang to other compilers" page, to help resolve some FAQ's.
Chris Lattner [Mon, 10 Dec 2007 01:44:24 +0000 (01:44 +0000)]
Add a "comparing clang to other compilers" page, to help resolve some FAQ's.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44754 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agolots of this is done.
Chris Lattner [Mon, 10 Dec 2007 00:14:49 +0000 (00:14 +0000)]
lots of this is done.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44753 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoabort when we lower an initializer to the wrong type, as we currently do for:
Chris Lattner [Mon, 10 Dec 2007 00:05:55 +0000 (00:05 +0000)]
abort when we lower an initializer to the wrong type, as we currently do for:
char text[] = "string";

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44752 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoextend or truncate the initializer for a string initializer to match its type.
Chris Lattner [Mon, 10 Dec 2007 00:00:56 +0000 (00:00 +0000)]
extend or truncate the initializer for a string initializer to match its type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44751 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement codegen support for:
Chris Lattner [Sun, 9 Dec 2007 23:49:42 +0000 (23:49 +0000)]
Implement codegen support for:
char text[8] = "string";

Big fixme remains.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44750 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAddress Chris's comments.
Anders Carlsson [Sun, 9 Dec 2007 23:39:18 +0000 (23:39 +0000)]
Address Chris's comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44749 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove target specific builtin IDs to TargetBuiltins.h so that they can be used by...
Anders Carlsson [Sun, 9 Dec 2007 23:17:02 +0000 (23:17 +0000)]
Move target specific builtin IDs to TargetBuiltins.h so that they can be used by CGBuiltin.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44748 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement correct semantic analysis of subtractions, implementing
Chris Lattner [Sun, 9 Dec 2007 21:53:25 +0000 (21:53 +0000)]
Implement correct semantic analysis of subtractions, implementing
C99 6.5.6.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44746 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement __builtin_ia32_mulps.
Anders Carlsson [Sun, 9 Dec 2007 21:51:19 +0000 (21:51 +0000)]
Implement __builtin_ia32_mulps.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44745 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoGenerate code for target specific intrinsics.
Anders Carlsson [Sun, 9 Dec 2007 21:20:04 +0000 (21:20 +0000)]
Generate code for target specific intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44744 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThe flags on tokens indicate whether they are the start of a *physical* line,
Chris Lattner [Sun, 9 Dec 2007 21:11:08 +0000 (21:11 +0000)]
The flags on tokens indicate whether they are the start of a *physical* line,
not the start of a logical line.  Be careful about this distinction, which
affects when newlines are printed and when paste-avoidance happens, etc.
This fixes PR1848, thanks to Neil for noticing this!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44743 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a pretty big but subtle bug counting the number of newlines to emit.
Chris Lattner [Sun, 9 Dec 2007 20:45:43 +0000 (20:45 +0000)]
Fix a pretty big but subtle bug counting the number of newlines to emit.
This would cause us to emit different code (in -E mode) for these two files:

---
#define t(x) x

t(a
3)
---
#define t(x) x
t(a
3)
---

In one case, -E would print "a\n3", in the other it printed "a3".  Now
it prints "a3" for both.

This is part of PR1848.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44742 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd dumping support for locations, make -dumptokens print out the location
Chris Lattner [Sun, 9 Dec 2007 20:31:55 +0000 (20:31 +0000)]
Add dumping support for locations, make -dumptokens print out the location
info of each token.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44741 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix typo noticed by Nico Weber
Chris Lattner [Sun, 9 Dec 2007 17:50:14 +0000 (17:50 +0000)]
Fix typo noticed by Nico Weber

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44739 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomany edits to the main page, add a prominant 'status' section.
Chris Lattner [Sun, 9 Dec 2007 09:05:23 +0000 (09:05 +0000)]
many edits to the main page, add a prominant 'status' section.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44737 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agounindent, don't zap whitespace before/after paragraphs.
Chris Lattner [Sun, 9 Dec 2007 08:40:26 +0000 (08:40 +0000)]
unindent, don't zap whitespace before/after paragraphs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44736 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosimplify the menu css, make it a bit more attractive.
Chris Lattner [Sun, 9 Dec 2007 08:38:01 +0000 (08:38 +0000)]
simplify the menu css, make it a bit more attractive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44735 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agocleanup some markup, e.g. & -> &
Chris Lattner [Sun, 9 Dec 2007 08:17:09 +0000 (08:17 +0000)]
cleanup some markup, e.g. & -> &

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44734 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoavoid ///usr/include/foo.h, patch by Sean Middleditch
Chris Lattner [Sun, 9 Dec 2007 00:39:55 +0000 (00:39 +0000)]
avoid ///usr/include/foo.h, patch by Sean Middleditch

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44731 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoimplement support for functions that initialize globals.
Chris Lattner [Sun, 9 Dec 2007 00:36:01 +0000 (00:36 +0000)]
implement support for functions that initialize globals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44730 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd getTargetPrefix to TargetInfo, to be used with target specific intrinsics.
Anders Carlsson [Sat, 8 Dec 2007 19:32:57 +0000 (19:32 +0000)]
Add getTargetPrefix to TargetInfo, to be used with target specific intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44712 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTest case for my last patch for implementation of static protocoled type
Fariborz Jahanian [Sat, 8 Dec 2007 01:00:55 +0000 (01:00 +0000)]
Test case for my last patch for implementation of static protocoled type
used as reciver type of a message expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44693 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoOmit the field name when including the super class structure template.
Steve Naroff [Fri, 7 Dec 2007 22:15:58 +0000 (22:15 +0000)]
Omit the field name when including the super class structure template.

This allows us to access a superclasses ivars without deriving the absolute path.

The comments below say a bit more...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44688 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplemented when static typing is combined with protocols and use as receiver
Fariborz Jahanian [Fri, 7 Dec 2007 21:21:21 +0000 (21:21 +0000)]
Implemented when static typing is combined with protocols and use as receiver
type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44685 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHave Sema::CheckConstantInitList skip semantic analysis when the element type is...
Steve Naroff [Fri, 7 Dec 2007 21:12:53 +0000 (21:12 +0000)]
Have Sema::CheckConstantInitList skip semantic analysis when the element type is a record (until we implement the FIXME). This removes a bogus error for the following code...

snarofflocal% cat bug.m

#import <Foundation/NSGeometry.h>

#define NUMHELICOPTERRECTS 5

static NSRect helicopterRects[NUMHELICOPTERRECTS] = {
    {{27, 0}, {18, 11}}, // Bottom
    {{0, 8}, {4, 11}}, // Tail
    {{0, 16}, {50, 1}},
    {{22, 5}, {18, 12}}, // Body
    {{0, 10}, {42, 3}}
};

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44684 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoLookup methods in the global pool even when a statically typed object's class interfa...
Steve Naroff [Fri, 7 Dec 2007 20:41:14 +0000 (20:41 +0000)]
Lookup methods in the global pool even when a statically typed object's class interface isn't in scope!

As the comment in the code indicates, I'm not fond of this. Nevertheless, gcc compat is a goal.

Here is the case I'm talking about...

#import <Foundation/Foundation.h>

@interface AnyClass : NSObject
- (NSRect)rect;
@end

@class Helicopter;

static void func(Helicopter *obj) {
  NSRect r = [obj rect];
}

...before this patch, we would warn/error. With this patch, everything "just works".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44682 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPatch for rewriting of @protocol.
Fariborz Jahanian [Fri, 7 Dec 2007 18:47:10 +0000 (18:47 +0000)]
Patch for rewriting of @protocol.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44681 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRewrite 'super' within a class method. This required some minor tweaks to the front...
Steve Naroff [Fri, 7 Dec 2007 03:50:46 +0000 (03:50 +0000)]
Rewrite 'super' within a class method. This required some minor tweaks to the front-end.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44673 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPatch to implement "Protocol" as a built-in type declared as
Fariborz Jahanian [Fri, 7 Dec 2007 00:18:54 +0000 (00:18 +0000)]
Patch to implement "Protocol" as a built-in type declared as
"@class Protocol;"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44670 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd workaround to get test/Parser/compound_literal.c working again.
Anders Carlsson [Thu, 6 Dec 2007 20:10:20 +0000 (20:10 +0000)]
Add workaround to get test/Parser/compound_literal.c working again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44666 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoOn Steve's suggestion, moved handling of use of undeclared method in a message
Fariborz Jahanian [Thu, 6 Dec 2007 19:49:56 +0000 (19:49 +0000)]
On Steve's suggestion, moved handling of use of undeclared method in a message
to rewriter (my previous patch).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44665 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMore struct bitfields layout work. Now handle,
Devang Patel [Thu, 6 Dec 2007 19:16:05 +0000 (19:16 +0000)]
More struct bitfields layout work. Now handle,

struct STestB1 {char a; char b:2; } stb1;
struct STestB2 {char a; char b:5; char c:4} stb2;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44664 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agotest case for my very last patch.
Fariborz Jahanian [Thu, 6 Dec 2007 17:43:04 +0000 (17:43 +0000)]
test case for my very last patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44662 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a bug handling typedefs of functions, patch by Nuno Lopes!
Chris Lattner [Thu, 6 Dec 2007 17:20:20 +0000 (17:20 +0000)]
Fix a bug handling typedefs of functions, patch by Nuno Lopes!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44661 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomake it more clear what 'foo' is
Chris Lattner [Thu, 6 Dec 2007 04:20:07 +0000 (04:20 +0000)]
make it more clear what 'foo' is

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44653 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoA missing method in a messaging expression issues a warning, clients must not
Fariborz Jahanian [Thu, 6 Dec 2007 01:37:55 +0000 (01:37 +0000)]
A missing method in a messaging expression issues a warning, clients must not
crash because of this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44648 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSubdivided the function InitializeBaseLanguage into InitializeBaseLanguage,
Ted Kremenek [Wed, 5 Dec 2007 23:49:08 +0000 (23:49 +0000)]
Subdivided the function InitializeBaseLanguage into InitializeBaseLanguage,
GetLanguage, and InitializeLangOptions.  The goal is to break up this logic
into atomic units of functionality that can later be refactored into better
driver logic that is capable of handling a mixture of source files of
different languages.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44642 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAvoid passing Diags into InitializeIncludePaths.
Chris Lattner [Wed, 5 Dec 2007 23:24:17 +0000 (23:24 +0000)]
Avoid passing Diags into InitializeIncludePaths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44639 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake sure Parser::ParseObjCSelectorExpression() handles unary selectors (with no...
Steve Naroff [Wed, 5 Dec 2007 22:21:29 +0000 (22:21 +0000)]
Make sure Parser::ParseObjCSelectorExpression() handles unary selectors (with no arguments) properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44636 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemoved dependence on including iostream (use llvm/Support/Streams.h instead).
Ted Kremenek [Wed, 5 Dec 2007 22:21:13 +0000 (22:21 +0000)]
Removed dependence on including iostream (use llvm/Support/Streams.h instead).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44635 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoConverted SerializationTest (--test-pickling) to use the new TranslationUnit
Ted Kremenek [Wed, 5 Dec 2007 22:08:43 +0000 (22:08 +0000)]
Converted SerializationTest (--test-pickling) to use the new TranslationUnit
class to serialize and deserialize translation units.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44634 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake sure the class methods get attached to the metaclass object.
Steve Naroff [Wed, 5 Dec 2007 21:49:40 +0000 (21:49 +0000)]
Make sure the class methods get attached to the metaclass object.
Need to query the implementation, not the interface...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44633 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded Driver/TranslationUnit.h and Driver/TranslationUnit.cpp to the
Ted Kremenek [Wed, 5 Dec 2007 21:36:57 +0000 (21:36 +0000)]
Added Driver/TranslationUnit.h and Driver/TranslationUnit.cpp to the
XCode project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44632 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded "TranslationUnit" class that will be used to provide an interface
Ted Kremenek [Wed, 5 Dec 2007 21:36:08 +0000 (21:36 +0000)]
Added "TranslationUnit" class that will be used to provide an interface
for serializing/deserializing ASTs that is decoupled from the logic
in SerializationTest (which will soon be rewritten to use this interface).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44631 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoModified: CreateTargetInfo(). Now takes Diagnostic* instead of Diagnostic&.
Ted Kremenek [Wed, 5 Dec 2007 21:34:36 +0000 (21:34 +0000)]
Modified: CreateTargetInfo().  Now takes Diagnostic* instead of Diagnostic&.
Modified: ctor of SerializationTest: Now takes LangOptions argument.  We
          will eventually serialize this as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44630 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded Basic/LangOptions.cpp to XCode project.
Ted Kremenek [Wed, 5 Dec 2007 19:07:32 +0000 (19:07 +0000)]
Added Basic/LangOptions.cpp to XCode project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44625 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplemented serialization of LangOptions.
Ted Kremenek [Wed, 5 Dec 2007 19:06:15 +0000 (19:06 +0000)]
Implemented serialization of LangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44624 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoI'm apparently the only sad lonely ppc user left :)
Chris Lattner [Wed, 5 Dec 2007 18:41:05 +0000 (18:41 +0000)]
I'm apparently the only sad lonely ppc user left :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44622 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMoved creation of ASTConsumers that can operate on both freshly-parsed and
Ted Kremenek [Wed, 5 Dec 2007 18:27:04 +0000 (18:27 +0000)]
Moved creation of ASTConsumers that can operate on both freshly-parsed and
deserialized ASTs into the function CreateASTConsumer().  This function
is called by ProcessInputFile, and soon the logic that processes deserialized
ASTs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44618 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPatch to prevent crash on use of objc2 syntax.
Fariborz Jahanian [Wed, 5 Dec 2007 18:16:33 +0000 (18:16 +0000)]
Patch to prevent crash on use of objc2 syntax.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44617 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoChanged type-cast of "struct objc_super"'s 2nd initializer to match definition of
Fariborz Jahanian [Wed, 5 Dec 2007 17:29:46 +0000 (17:29 +0000)]
Changed type-cast of "struct objc_super"'s 2nd initializer to match definition of
"struct objc_super".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44616 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix some bogus code noticed by Kevin Andre
Chris Lattner [Wed, 5 Dec 2007 17:21:34 +0000 (17:21 +0000)]
fix some bogus code noticed by Kevin Andre

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44615 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement CodeGen for vectors. Don't create unnecessary conversion instructions if...
Anders Carlsson [Wed, 5 Dec 2007 07:36:10 +0000 (07:36 +0000)]
Implement CodeGen for vectors. Don't create unnecessary conversion instructions if the value to be converted is a constant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44606 91177308-0d34-0410-b5e6-96231b3b80d8