summaryrefslogtreecommitdiffstats
path: root/clang/Driver/RewriteTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* 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-031-11/+6
| | | | | | | 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
* 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
* Add some plumbing to help cope with rewriting "id<p>", "Class<p>*".Steve Naroff2007-10-311-3/+34
| | | | llvm-svn: 43543
* 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
* Start rewriting ObjC interfaces. As a start, we comment out all the methods. ↵Steve Naroff2007-10-261-3/+30
| | | | | | This involved refining how the parser/AST passes/manages SourceLocations for ObjcMethodDecl's. llvm-svn: 43404
* Patch to synthesize computation of Ivar offset in rewritten c file.Fariborz Jahanian2007-10-261-6/+83
| | | | | | Thanks to Steve N. to point out using of offsetof for this. llvm-svn: 43391
* Refactored several meta data for reusability.Fariborz Jahanian2007-10-251-245/+346
| | | | | | | Changed the entire rewrite of metadata to write to std::string object instead of stdout. llvm-svn: 43360
* Convert one type of metadata to use std::string instead ofChris Lattner2007-10-251-26/+46
| | | | | | printf as an example. llvm-svn: 43346
* Refactored RewriteObjcMethodsMetaData to better rewrite Fariborz Jahanian2007-10-251-9/+14
| | | | | | instance/class methods metadata. llvm-svn: 43320
* More work on translating message expressions. Steve Naroff2007-10-241-36/+93
| | | | | | | | | | | | | | | | | | Still to do: - Chris will fix a bug in the rewriting engine for nested stmts. For example, the following: NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; tranlates to: NSAutoreleasePool * pool = objc_msgSend(objc_msgSend(objc_getClass("NSAutoreleasePool"), sel_getUid("alloc")), sel_getUid("init"))utoreleasePool"), sel_getUid("alloc")) init]; ...which is correct, except there is garbage after sel_getUid("init"). This is because the rewriter isn't updating the extent of the containing message expression. - Do the crazy cast thang. llvm-svn: 43316
* Remove explicit use of size of known structs in metadata generation.Fariborz Jahanian2007-10-241-5/+3
| | | | llvm-svn: 43313
* Couple of minor changes. 1) Metaclass metadata also has a reference toFariborz Jahanian2007-10-241-1/+9
| | | | | | | protocol meta-data (unlike what documentation says). 2) Include objc.h so, we can compile the generated metadata with both gcc and clang. llvm-svn: 43311
* Refactord instance and class metadata emission. Refactored protocols ↵Fariborz Jahanian2007-10-241-112/+208
| | | | | | | | metadata emission. Implemented emission of category metadata, llvm-svn: 43308
* Fix some long lines, move code around into logical groups.Chris Lattner2007-10-241-94/+123
| | | | llvm-svn: 43299
* Use Ted's new mutable child iterators to update the tree as we rewrite it.Chris Lattner2007-10-241-9/+17
| | | | | | This will make nested subexprs work. llvm-svn: 43296
* Incorporate some feedback from Chris...Steve Naroff2007-10-241-4/+4
| | | | llvm-svn: 43285
* Add some plumbing to rewrite message expressions (still under construction).Steve Naroff2007-10-231-4/+49
| | | | llvm-svn: 43274
* - Add rewrite rule for @class.Steve Naroff2007-10-231-1/+35
| | | | | | | - Add setter/getter to ObjcClassDecl. - Predefined key runtime functions. llvm-svn: 43257
* Patch to complete metadata generation for each implemented class.Fariborz Jahanian2007-10-231-28/+55
| | | | llvm-svn: 43255
* Patch for initialization of class's Meta-class metadata.Fariborz Jahanian2007-10-231-1/+65
| | | | llvm-svn: 43235
* This patch generates protocol metadata and all its sub-metadata.Fariborz Jahanian2007-10-221-12/+165
| | | | llvm-svn: 43233
* rewrite of metadata for implemented instance methods.Fariborz Jahanian2007-10-191-0/+43
| | | | llvm-svn: 43159
* Patch to rewrite ivar tables metadata for classes defined.Fariborz Jahanian2007-10-181-1/+57
| | | | llvm-svn: 43151
* First patch toward rewriting of objective-c's meta data.Fariborz Jahanian2007-10-181-0/+72
| | | | llvm-svn: 43143
OpenPOWER on IntegriCloud