Anders Carlsson
acea415ec5
More comments from Chris.
...
llvm-svn: 47210
2008-02-16 03:37:41 +00:00
Anders Carlsson
e5070069c8
Store attributes in a global hash map instead.
...
llvm-svn: 47191
2008-02-15 23:30:50 +00:00
Anders Carlsson
1a84106117
Get rid of AttributeList in the AST and use the new Attr class instead
...
llvm-svn: 47155
2008-02-15 07:04:12 +00:00
Anders Carlsson
5c6c05956e
Put back the top-level asm code; all tests pass now.
...
llvm-svn: 46868
2008-02-08 00:33:21 +00:00
Anders Carlsson
0fae4f56df
Back out 46855 for now, it causes test failures on Darwin.
...
llvm-svn: 46867
2008-02-08 00:23:11 +00:00
Anders Carlsson
bcc3a4bf64
Handle top-level asm declarations.
...
llvm-svn: 46855
2008-02-07 17:19:11 +00:00
Fariborz Jahanian
54e42318c0
Missing ObjC stuff. Patch by Mike Stump.
...
llvm-svn: 46268
2008-01-23 01:34:33 +00:00
Fariborz Jahanian
ad134b987e
Renamed getSynthesizedSelectorSize to getSynthesizedMethodSize. Compute method name
...
size in accordance with how rewriter synthesizes method name.
llvm-svn: 46131
2008-01-17 17:37:26 +00:00
Fariborz Jahanian
386699515b
Computed length of a __func__ identifier used in an objective-c method correctly,
...
when creating its type.
llvm-svn: 46109
2008-01-17 01:36:09 +00:00
Chris Lattner
38376f1595
Add first pieces of support for parsing and representing
...
extern "C" in C++ mode. Patch by Mike Stump!
llvm-svn: 45904
2008-01-12 07:05:38 +00:00
Ted Kremenek
1b0ea82459
Substituted all instances of the string "Objc" for "ObjC". This fixes
...
some naming inconsistencies in the names of classes pertaining to Objective-C
support in clang.
llvm-svn: 45715
2008-01-07 19:49:32 +00:00
Chris Lattner
5b12ab8c93
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change.
llvm-svn: 45410
2007-12-29 19:59:25 +00:00
Fariborz Jahanian
63b19f1b6e
Patch to do type-checking for objctive-c's object types.
...
More is yet to come.
llvm-svn: 45263
2007-12-20 19:24:10 +00:00
Steve Naroff
fa5751f842
Various tweaks to the get/lookup instance/class method API's.
...
llvm-svn: 45224
2007-12-19 22:27:04 +00:00
Steve Naroff
3ce37a6b8e
- Remove getInstanceMethods/getClassMethods API on ObjcInterfaceDecl, ObjcProtocolDecl, and ObjcCategoryDecl. These methods are replaced by the respective iterators on each class.
...
- Add getInstanceMethodForSelector to ObjcInterfaceDecl, ObjcProtocolDecl, and ObjcCatgoryDecl. This hook will do a "shallow" lookup. This is a convenience method that reducing some of the iterator usage.
- Various changes to convert all clients to the above API's...
llvm-svn: 45046
2007-12-14 23:37:57 +00:00
Chris Lattner
7354e6a50e
fix typo
...
llvm-svn: 44932
2007-12-12 08:17:45 +00:00
Chris Lattner
30d23e8289
more cleanups changing things like getInstanceVariables to iterators.
...
llvm-svn: 44930
2007-12-12 07:56:42 +00:00
Chris Lattner
31bc07e6cf
resolve some fixmes and clean up some code by eliminating the get*Vars apis to some classes and use iterators instead.
...
llvm-svn: 44927
2007-12-12 07:46:12 +00:00
Chris Lattner
854f3167c0
start cleaning up interfaces for objc bits and pieces by switching to an
...
iterator interface.
llvm-svn: 44926
2007-12-12 07:30:05 +00:00
Fariborz Jahanian
ff6a455c12
Implemented when static typing is combined with protocols and use as receiver
...
type.
llvm-svn: 44685
2007-12-07 21:21:21 +00:00
Chris Lattner
b36a98e9a3
Fix a bug handling typedefs of functions, patch by Nuno Lopes!
...
llvm-svn: 44661
2007-12-06 17:20:20 +00:00
Chris Lattner
e69d662bae
simplify some code, add support for functions without a proto
...
llvm-svn: 44485
2007-12-01 05:58:21 +00:00
Steve Naroff
fedb49771d
Add category method definitions incrementally, removing a FIXME (like we do for class implementations).
...
llvm-svn: 44027
2007-11-12 22:05:31 +00:00
Steve Naroff
e3d1ab29da
- Minor cleanup to yesterday's changes to Sema::ObjcActOnStartOfMethodDef();
...
- Add Sema::CurMethodDecl, in preparation for adding ObjcIvarRefExpr.
- Add ObjcInterfaceDecl::lookupInstanceVariable(), in prep for adding ivars.
- A couple renames in ObjcInterfaceDecl, while I was in the vicinity:-)
llvm-svn: 44015
2007-11-12 13:56:41 +00:00
Steve Naroff
cac26f4f5f
This is the last 5% of the solution to teaching Sema::ActOnInstanceMessage() about private methods (r43989).
...
While the diff is large, the idea is very simple. When we parse method definitions (in an @implementation), we need to add them incrementally (rather than wait until the @end).
Other details...
- Renamed Sema::ActOnAddMethodsToObjcDecl() to Sema::ActOnAtEnd(). The methods are now optional arguments.
- Removed Parser::AllImplMethods (a nice cleanup).
- Added location info to ObjcImplementationDecl (since we will need it very soon:-)
- Modified message.m test to no longer allow the bogus diagnostic.
llvm-svn: 43995
2007-11-11 17:19:15 +00:00
Steve Naroff
22e078e013
Teach Sema::ActOnInstanceMessage() about private methods. That is, methods declared in an implementation (but not listed in the interface).
...
This commit is only 95% of the bug fix. The last piece to this puzzle is to add the method decls to the implementation incrementally (as we encounter them). At the moment, the methods aren't added until we see an @end (which is too late).
I will complete this later...
llvm-svn: 43989
2007-11-11 00:10:47 +00:00
Fariborz Jahanian
f76f2b0c1c
Patch for objc2's property ASTs, as well as pretty-priting the ASTs.
...
llvm-svn: 43778
2007-11-06 22:01:00 +00:00
Steve Naroff
5448cf6d61
- Add location info to category/protocol AST's
...
- Rewrite categories.
llvm-svn: 43501
2007-10-30 13:30:57 +00:00
Steve Naroff
c54840433f
More support for rewriting ObjC intefaces. Still some edge cases to handle...
...
llvm-svn: 43493
2007-10-30 02:23:23 +00:00
Steve Naroff
33a1e80dd1
This commit contains lot's of small tweaks to how we pass around and store SourceLocation's for interfaces/protocols/categories/implementations.
...
llvm-svn: 43475
2007-10-29 21:38:07 +00:00
Steve Naroff
5d15254496
- Teach ObjcInterfaceDecl::lookupInstance/ClassMethod to look through protocols.
...
- Start looking up methods in the global method pools (for "id").
- Start integrating interface types into the type system.
llvm-svn: 42971
2007-10-14 23:13:51 +00:00
Steve Naroff
ca0ecfe048
Add category lookup (removing a couple FIXME's).
...
Changed ObjcInterfaceDecl::ListCategories->CategoryList.
llvm-svn: 42968
2007-10-14 18:27:41 +00:00
Fariborz Jahanian
49c6425ee6
This patch implementa objective-c's @compatibilty-alias declaration.
...
llvm-svn: 42883
2007-10-11 23:42:27 +00:00
Chris Lattner
ba9dddb01e
Rename FileVariable -> FileVar for consistency with its class name,
...
likewise block and param. Reorder the layout of the Decl kind enum
so that the inheritance tree is reflected in the ordering. This allows
trivial range comparisons to determine whether something is an instance
of some abstract class, making classof faster.
llvm-svn: 42772
2007-10-08 21:37:32 +00:00
Chris Lattner
ef6b136781
move IdentifierTable.h from liblex to libbasic.
...
llvm-svn: 42730
2007-10-07 08:58:51 +00:00
Chris Lattner
a4016555d2
introduce a new NamedDecl class, switch a couple of things over to using it.
...
NamedDecl is a Decl that has an IdentifierInfo (for example, ScopedDecl),
but not ObjcMethodDecl.
Simplify some code in ActOnAddMethodsToObjcDecl, by doing the cast from
DeclTy to Decl at the start of the method.
llvm-svn: 42710
2007-10-06 22:53:46 +00:00
Fariborz Jahanian
76aff36d64
More tab removal activity.
...
llvm-svn: 42608
2007-10-04 17:06:28 +00:00
Fariborz Jahanian
673414067b
Fixed tabs in couple of sources.
...
llvm-svn: 42601
2007-10-04 00:45:27 +00:00
Fariborz Jahanian
b8d9e088a7
Unified such names as protocol references, instance methods and class methods
...
and their accessors in a variety of objective-c classes.
llvm-svn: 42555
2007-10-02 22:05:16 +00:00
Steve Naroff
c6814ea670
- Add ObjcInterfaceDecl::lookupInstanceMethod(), lookupClassMethod().
...
- Add ObjcMessageExpr::getSelector(), getClassName().
- Change Sema::getObjCInterfaceDecl() to simply take an IdentifierInfo (no Scope needed).
- Remove FIXME for printing ObjCMessageExpr's.
llvm-svn: 42543
2007-10-02 20:01:56 +00:00
Fariborz Jahanian
89b8ef92be
This patch introduces the ObjcCategoryImplDecl class and does the checking related to
...
unimplemented methods in category implementation.
llvm-svn: 42531
2007-10-02 16:38:50 +00:00
Steve Naroff
67391b8a54
Move ObjC decls to DeclObjC.h, a new AST header.
...
Update clients and add to project file.
llvm-svn: 42494
2007-10-01 19:00:59 +00:00
Fariborz Jahanian
f26702eb54
Took care of clatter's suggestions, dated.
...
September 30, 2007 12:36:58 AM PDT and
September 30, 2007 12:50:05 AM PDT
llvm-svn: 42490
2007-10-01 16:53:59 +00:00
Fariborz Jahanian
a725bf7782
Unused ObjcProtoMethod is removed.
...
llvm-svn: 42485
2007-09-30 18:53:32 +00:00
Fariborz Jahanian
f6546b38b2
Patch for method implementation. It populates ObjcImplementationDecl object with method implementation declarations .
...
It checks and warns on those methods declared in class interface and not implemented.
llvm-svn: 42412
2007-09-27 18:57:03 +00:00
Fariborz Jahanian
2a4dd316a0
This patch inserts ivars declared in @implementation in its object and verifies
...
that they conform(in type, name and numbers) to those declared in @interface.
Test case highlights kind of checking we do here.
llvm-svn: 42360
2007-09-26 18:27:25 +00:00
Fariborz Jahanian
bfe13c566c
This patch introduces a new class to keep track of class implementation info. It also adds more
...
semantic checks for class and protocol declarations. Test cases are good indications of kind of
checking being done in this patch.
llvm-svn: 42311
2007-09-25 18:38:09 +00:00
Fariborz Jahanian
876e27dafa
This patch instantiates objects for forward protocols and in general handles use of
...
protocols referenced in @protocol declarations.
llvm-svn: 42191
2007-09-21 15:40:54 +00:00
Fariborz Jahanian
867a7eb5cb
Patch for object creation and handling of category declarations.
...
llvm-svn: 42104
2007-09-18 20:26:58 +00:00
Fariborz Jahanian
cfacdae9a8
Patch to remove ObjcProtoMethodDecl and use ObjcMethodDecl
...
instead for @protocol method decls.
llvm-svn: 42070
2007-09-17 22:36:42 +00:00