aboutsummaryrefslogtreecommitdiff
path: root/Driver/RewriteTest.cpp
AgeCommit message (Collapse)Author
2007-12-05Make sure the class methods get attached to the metaclass object.Steve Naroff
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
2007-12-05Changed type-cast of "struct objc_super"'s 2nd initializer to match ↵Fariborz Jahanian
definition of "struct objc_super". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44616 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-04Add the definition of objc_super...Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44588 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-04Type-cast initializers for "struct objc_super" parameter to avoid warning.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44583 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-04Don't assert if objc.h not declared when rewriting.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44580 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-04Removed a "TODO" comment as objc1 runtime does not need to do the "TODO".Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44577 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-03Change <Objc/objc.h> to <objc/objc.h>Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44556 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-03Fixed a bug exposed by referencing an ivar field using component reference ↵Fariborz Jahanian
syntax. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44553 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-03Support for rewriteing of messaging of methods which return float.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44548 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-03Added support for messagings which return a structure-value.Fariborz Jahanian
(Also fixed a regression caused by recent changes to synthesis of structs). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44540 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02fix a crash when the rewriter would scan off the beginning of the file.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44499 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02add support for custom client-specific diagnostics. As a testcase, make the Chris Lattner
rewriter emit this error if it fails to rewrite an @encode: t.m:17:9: error: rewriter could not replace sub-expression due to macros c = ENC(char *)[2] + 4; ^~~~~~~~~~~ ... where ENC is: #define ENC @encode git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44498 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-30start partitioning the diagnostics into two classes: thoseChris Lattner
that are builtin and those that are aren't. This is a bunch of API refactoring that will make this possible, but there is no functionality change yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44473 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-30pass diagnostics into the rewrite test client.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44468 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-26Fixed a rewrite bug in class synthesis (which I first thought was a rewrite ↵Fariborz Jahanian
API bug). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44335 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-26Patch to fix a regression caused by recent rewrite changes.Fariborz Jahanian
A potential API bug in ReplaceText pending (A FIXME is added). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44333 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15No need to forward declare definition of objc_super...Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44173 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15Implement support for variadic methods (work in progress).Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44171 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15Extend RewriteTest::RewriteObjCIvarRefExpr() to cope with static typing ↵Steve Naroff
(when using -> on a type which corresponds to the implementation type). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44170 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15Tweak funky cast to accommodate messaging 'super'. This removes any spurious ↵Steve Naroff
warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44169 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15Rewrite for messaging 'super'.Steve Naroff
The code gen. results in some spurious warnings...a cast is forthcoming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44168 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15- Implement ivar rewrite (patch by Fariborz).Steve Naroff
- RewriteMessageExpr()...make implicit casts explicit with synthesizing call (removing warnings when calling objc_msgSend()). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44156 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-15Refinement to previous commit. Always cast the first argument to "id"...no ↵Steve Naroff
need to special case self. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44149 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14Cast implicit "self" argument to "id". This removes all warnings associated ↵Steve Naroff
with implicit references to self. It doesn't yet deal withexplicit references to self... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44148 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14Always generate a typedef for @class. The typedef removal logic that I'm ↵Steve Naroff
removing only made sense when we were operating on preprocess files without typedef guards. Now that we have guards, it is incorrect to ever remove one (since it may increase the likelihood that the rewritten header can't be included stand alone). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44145 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14Fix a rewriter bug that steve noticed. Don't skip arbitrary thingsChris Lattner
between an @ and a p, just skip whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44144 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14Patch to comment out use of protocol qualifiers when rewriting ivars.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44142 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14Fairly major surgery to RewriteTest::SynthesizeObjcInternalStruct().Steve Naroff
This allows us to handle funky stuff like... #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 @interface NSLayoutManager : NSObject <NSCoding, NSGlyphStorage> { #else /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 */ @interface NSLayoutManager : NSObject <NSCoding> { #endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 */ ...which now rewrites to... #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 #ifndef _REWRITER_typedef_NSLayoutManager #define _REWRITER_typedef_NSLayoutManager typedef struct objc_object NSLayoutManager; #endif struct NSLayoutManager { struct NSObject _NSObject; #else /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 */ // @interface NSLayoutManager : NSObject <NSCoding> { #endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 */ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44129 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14Removed unused variabel.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44123 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14Fix yesterday's regression with rewriting @optional/@required.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44119 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14Rewrite methods that span multiple lines.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44118 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14Comment out recent regression r44096.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44098 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14Rewrite @optional/@required directives used inside protocol definitions.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44096 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14Rewrite of forward protocol declaration.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44095 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-13Rewrite method definition bodies. Also renamed a method to distinguish ↵Steve Naroff
between method declarations and definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44080 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-13Fixed a rewrite of metadata bug when category implementation has no matching ↵Fariborz Jahanian
interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44072 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-13Populate metadata with adrress of method code.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44066 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-13Rewrite of method definitions in categories.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44062 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-13Order of methods are OK and generated .c file can be compiled.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44060 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-13First patch in rewrie of method definitions. This is work in progress.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44055 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-12- Minor cleanup to yesterday's changes to Sema::ObjcActOnStartOfMethodDef();Steve Naroff
- 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:-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44015 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-11This is the last 5% of the solution to teaching Sema::ActOnInstanceMessage() ↵Steve Naroff
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43995 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-09Rewrite global variable initializers. Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43947 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-09- add typedef guards.Steve Naroff
- tweak scanForProtocolRefs heuristic. - disable RewriteInclude() for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43942 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-08Rewrite RewriteObjCStringLiteral(). This version is simpler (and unlike the ↵Steve Naroff
previous one, works:-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43890 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-08use insert instead of replacing 0 bytes with text :)Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43882 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-08use std::copy instead of memcpy for abstraction.Chris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43880 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-07Finishing touches on code generation for @try and friends.Steve Naroff
- declare functions we use. - cast arguments to objc_exception_match(). - don't take the & of _stack.buf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43831 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-07Emit objective-c's meta-data at the end of rewriting to stdout.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43830 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-07Implement rewrite for @throw.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43820 91177308-0d34-0410-b5e6-96231b3b80d8