summaryrefslogtreecommitdiffstats
path: root/clang/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* - Minor cleanup to yesterday's changes to Sema::ObjcActOnStartOfMethodDef();Steve Naroff2007-11-122-5/+5
| | | | | | | | - 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
* This is the last 5% of the solution to teaching Sema::ActOnInstanceMessage() ↵Steve Naroff2007-11-111-2/+2
| | | | | | | | | | | | | | | 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
* pretty priting for method definitions.Fariborz Jahanian2007-11-101-2/+53
| | | | llvm-svn: 43986
* Modifed the test serialization driver to...Ted Kremenek2007-11-101-17/+27
| | | | | | | | | | | | | | | | | | | (1) serialize out top-level decls BEFORE serializing out translation unit structures like ASTContext. (2) deserialize out translation unit structures like ASTContext before top-level decls by first skipping the decls in the bitstream, deserializing ASTContext and friends, and then jumping back to the bitstream block with the decls and then deserializing them. Change (1) allows us to utilize the pointer-tracking system in the Serializer to only serialize out metadata that is actually referenced by the ASTS. Change (2) allows us to deserialize the metadata first as before, which signficantly reduces the amount of pointer backpatching the deserializer would have to do if the decls were deserialized first. llvm-svn: 43974
* Rewrite global variable initializers. Steve Naroff2007-11-091-4/+8
| | | | llvm-svn: 43947
* - add typedef guards.Steve Naroff2007-11-091-7/+20
| | | | | | | - tweak scanForProtocolRefs heuristic. - disable RewriteInclude() for now. llvm-svn: 43942
* Rewrite RewriteObjCStringLiteral(). This version is simpler (and unlike the ↵Steve Naroff2007-11-081-1/+34
| | | | | | previous one, works:-) llvm-svn: 43890
* use insert instead of replacing 0 bytes with text :)Chris Lattner2007-11-081-10/+10
| | | | llvm-svn: 43882
* use std::copy instead of memcpy for abstraction.Chris Lattner2007-11-081-1/+3
| | | | | | | Disable rewrite-tabs. This speeds up processing of the commentified huge crazy testcase steve gave me from 20s to 6.6s in a release build. llvm-svn: 43880
* Finishing touches on code generation for @try and friends.Steve Naroff2007-11-071-6/+13
| | | | | | | | - declare functions we use. - cast arguments to objc_exception_match(). - don't take the & of _stack.buf. llvm-svn: 43831
* Emit objective-c's meta-data at the end of rewriting to stdout.Fariborz Jahanian2007-11-071-3/+2
| | | | llvm-svn: 43830
* Implement rewrite for @throw.Steve Naroff2007-11-071-10/+28
| | | | llvm-svn: 43820
* Rewrite ObjC @try/@catch/@finally. Some minor tweaks to the AST nodes...Steve Naroff2007-11-071-2/+138
| | | | | | Still need to rewrite @throw (and do more testing)... llvm-svn: 43803
* Rewrite for properties.Fariborz Jahanian2007-11-071-1/+15
| | | | llvm-svn: 43791
* Fixed typo in the name of "ReadPreamble".Ted Kremenek2007-11-061-2/+2
| | | | llvm-svn: 43790
* Bug fix: inverted test condition to see if a serialized AST-bitcodeTed Kremenek2007-11-061-1/+1
| | | | | | file had the correct preamble. llvm-svn: 43785
* Patch for objc2's property ASTs, as well as pretty-priting the ASTs.Fariborz Jahanian2007-11-061-3/+71
| | | | llvm-svn: 43778
* Revampled Serialization Tester to serialize and deserialize out an entire ↵Ted Kremenek2007-11-061-112/+161
| | | | | | ASTContext and top-level decls. llvm-svn: 43773
* In driver code implemented serialization of ASTContext. Working on ↵Ted Kremenek2007-11-051-87/+126
| | | | | | serialization of simple ASTs. llvm-svn: 43738
* Misc. fixes. 1) Resurrect meta-data generation turned off by a previous patch.Fariborz Jahanian2007-11-051-2/+34
| | | | | | | 2) Fixed a regression in meta-data generation caused by removal of '_interface' prefix from synthesize class name. 3) Added stubs for @try/@catch/@finally statements. llvm-svn: 43716
* Declare objc_selector outside the prototype for objc_msgSend(), removing a ↵Steve Naroff2007-11-051-1/+4
| | | | | | silly warning. llvm-svn: 43706
* Rewrite @selector(sel).Steve Naroff2007-11-051-0/+20
| | | | llvm-svn: 43705
* - change the synthesized typedef (for classes) to be of type "objc_object".Steve Naroff2007-11-051-15/+11
| | | | | | | - fix a couple bugs in RewriteObjCStringLiteral. - convert "Class" -> "id" in RewriteMessageExpr. llvm-svn: 43704
* Remove HandleObjcMetaDataEmission(), I inadvertantly resurrected it.Steve Naroff2007-11-051-11/+0
| | | | llvm-svn: 43690
* Two additions...Steve Naroff2007-11-041-5/+52
| | | | | | | | | | | | | | | - Synthesize the funky cast for objc_msgSend(). For the basic case, it looks like... ((id (*)(id, SEL))(void *)objc_msgSend)(obj, sel); The "void *" cast is needed to workaround a GCC "bandaid" (Chris says it has something to do with the inliner). Without the extra "void *" cast, we get spurious warnings/notes that look like... xx.m:17: warning: function called through a non-compatible type xx.m:17: note: if this code is reached, the program will abort - Add prototypes for the ObjC functions we call, objc_msgSend/objc_getClass for now (don't depend on them being included). llvm-svn: 43685
* Implement rewrite rules for ObjC string constants.Steve Naroff2007-11-031-10/+75
| | | | llvm-svn: 43665
* Fix ownership model of ParseAST to allow the dtor of Chris Lattner2007-11-033-18/+12
| | | | | | | ASTConsumer to process the AST before it is destroyed. This allows elimination of HandleObjcMetaDataEmission. llvm-svn: 43659
* - Remove _interface_ prefix for the synthesized tag names.Steve Naroff2007-11-011-9/+8
| | | | | | - Also removed a tab from the generated struct (minor). llvm-svn: 43616
* Implement rewrite rule for commenting out protocol references. For example:Steve Naroff2007-11-011-24/+68
| | | | | | | | | | extern id /*<NSObject>*/ NSAllocateObject(Class aClass, unsigned extraBytes, NSZone *zone); extern void NSDeallocateObject(id /*<NSObject>*/object); extern id /*<NSObject>*/ NSCopyObject(id /*<NSObject>*/object, unsigned extraBytes, NSZone *zone); llvm-svn: 43612
* Tweak RewriteInterfaceDecl() to generate a typedef (if one hasn't already ↵Steve Naroff2007-11-011-0/+11
| | | | | | been generated). llvm-svn: 43600
* 1) More additions for objective-c's qualifier type.Fariborz Jahanian2007-10-311-2/+1
| | | | | | 2) Fixed a test failure (which should have failed all along!). llvm-svn: 43589
* Fixed a bug exposed by fixing the assert in previous patch (one of the tests ↵Fariborz Jahanian2007-10-311-0/+3
| | | | | | asserted). llvm-svn: 43586
* Changed direction of assert. Added more comments.Fariborz Jahanian2007-10-311-2/+5
| | | | llvm-svn: 43585
* Fix two rewriter bugs:Steve Naroff2007-10-311-2/+9
| | | | | | | | | | | | | | | | | | - For @class, don't generate multiple typedefs. - Handle the following edge case interface... @interface NSMiddleSpecifier : NSObject {} @end ...which was incorrectly being rewritten to... struct _interface_NSMiddleSpecifier { struct _interface_NSObject _NSObject; }; {} llvm-svn: 43582
* Implement ObjC built-in types in MinimalAction.Steve Naroff2007-10-313-5/+10
| | | | | | This fixes the recent regression with selector-1.m and -parse-noop. llvm-svn: 43575
* Take 2.Devang Patel2007-10-312-2/+10
| | | | | | | | Make target info available to clang code generator. This is far from complete but this helps clang codegen module make progress. At the moment target triplet and target description strings are hard coded in clang::TargetInfo llvm-svn: 43572
* Rewriteing of ivars changed to just copy directly from the source.Fariborz Jahanian2007-10-311-9/+34
| | | | llvm-svn: 43560
* Checking in some code that is still under construction.Steve Naroff2007-10-311-5/+12
| | | | | | I need to (finally) change the way Class/id/SEL/IMP are built-in...the current approach of doing it in the preprocessor is "broken". The other problem is Sema::GetObjcIdType/GetObjcSelType/GetObjcClassType, the hooks that initialize ASTContext lazily. These built-in types need to be done up front... llvm-svn: 43557
* temporarily revert devang's patch to link in the llvm codegen etc.Chris Lattner2007-10-312-21/+3
| | | | llvm-svn: 43544
* Add some plumbing to help cope with rewriting "id<p>", "Class<p>*".Steve Naroff2007-10-311-3/+34
| | | | llvm-svn: 43543
* Make target info available to clang code generator.Devang Patel2007-10-312-3/+21
| | | | | | | This is far from complete but this helps clang codegen module make progress. llvm-svn: 43536
* Stop pre-defining objc_msgSend/objc_getClass in the preprocessor. Instead, I ↵Steve Naroff2007-10-301-8/+49
| | | | | | generate these declaration on the fly when rewriting a message expression. llvm-svn: 43529
* Rewrite protocols.Steve Naroff2007-10-301-1/+18
| | | | llvm-svn: 43503
* - Add location info to category/protocol AST'sSteve Naroff2007-10-301-21/+33
| | | | | | - Rewrite categories. llvm-svn: 43501
* Remove a couple FIXME's for rewriting ObjC interfaces (which are now being ↵Steve Naroff2007-10-301-8/+5
| | | | | | rewritten properly). llvm-svn: 43494
* More support for rewriting ObjC intefaces. Still some edge cases to handle...Steve Naroff2007-10-301-0/+21
| | | | llvm-svn: 43493
* Encoding for objectiive-c methods.Fariborz Jahanian2007-10-291-14/+21
| | | | llvm-svn: 43481
* Do the encoding of ivar types in the ivar metadata.Fariborz Jahanian2007-10-291-4/+10
| | | | llvm-svn: 43454
* Add (partial) support for @encode.Anders Carlsson2007-10-291-1/+4
| | | | llvm-svn: 43439
* Path to synthesize 'instance' size field of _objc_class metadata.Fariborz Jahanian2007-10-261-6/+11
| | | | llvm-svn: 43409
OpenPOWER on IntegriCloud