]> granicus.if.org Git - clang/log
clang
16 years agoFinishing touches on code generation for @try and friends.
Steve Naroff [Wed, 7 Nov 2007 18:43:40 +0000 (18:43 +0000)]
Finishing touches on code generation for @try and friends.

- 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

16 years agoEmit objective-c's meta-data at the end of rewriting to stdout.
Fariborz Jahanian [Wed, 7 Nov 2007 18:40:28 +0000 (18:40 +0000)]
Emit objective-c's meta-data at the end of rewriting to stdout.

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

16 years agoRemove old asserts from ASTContext::isObjcIdType() and isObjcClassType(). Instead...
Steve Naroff [Wed, 7 Nov 2007 18:07:59 +0000 (18:07 +0000)]
Remove old asserts from ASTContext::isObjcIdType() and isObjcClassType(). Instead, return false if the declarations aren't in scope. This was a hold over from when 'id' and 'Class' were initialized lazily.

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

16 years agoFixed an array overflow bug.
Fariborz Jahanian [Wed, 7 Nov 2007 17:43:16 +0000 (17:43 +0000)]
Fixed an array overflow bug.

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

16 years agoFixed typo.
Fariborz Jahanian [Wed, 7 Nov 2007 17:29:15 +0000 (17:29 +0000)]
Fixed typo.

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

16 years agoImplemented serialization of CharacterLiteral.
Ted Kremenek [Wed, 7 Nov 2007 17:15:49 +0000 (17:15 +0000)]
Implemented serialization of CharacterLiteral.

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

16 years agoImplemented serialiation of PreDefinedExpr.
Ted Kremenek [Wed, 7 Nov 2007 17:11:58 +0000 (17:11 +0000)]
Implemented serialiation of PreDefinedExpr.

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

16 years agoImplemented serialization of ContinueStmt.
Ted Kremenek [Wed, 7 Nov 2007 17:05:07 +0000 (17:05 +0000)]
Implemented serialization of ContinueStmt.

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

16 years agoImplemented serialization of IndirectGotoStmt.
Ted Kremenek [Wed, 7 Nov 2007 17:02:32 +0000 (17:02 +0000)]
Implemented serialization of IndirectGotoStmt.
Added "FIXME" regarding the lack of source location information for IndirectGotoStmt.

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

16 years agoImplement rewrite for @throw.
Steve Naroff [Wed, 7 Nov 2007 15:32:26 +0000 (15:32 +0000)]
Implement rewrite for @throw.

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

16 years agoImplemented serialization of GotoStmt.
Ted Kremenek [Wed, 7 Nov 2007 08:07:46 +0000 (08:07 +0000)]
Implemented serialization of GotoStmt.

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

16 years agoImplemented serialization for ForStmt.
Ted Kremenek [Wed, 7 Nov 2007 08:02:55 +0000 (08:02 +0000)]
Implemented serialization for ForStmt.

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

16 years agoImplemented serialization of DoStmt.
Ted Kremenek [Wed, 7 Nov 2007 07:53:55 +0000 (07:53 +0000)]
Implemented serialization of DoStmt.

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

16 years agoImplemented serialization for WhileStmt.
Ted Kremenek [Wed, 7 Nov 2007 07:50:10 +0000 (07:50 +0000)]
Implemented serialization for WhileStmt.

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

16 years agoImplemented serialization of IfStmt.
Ted Kremenek [Wed, 7 Nov 2007 07:19:30 +0000 (07:19 +0000)]
Implemented serialization of IfStmt.

Fixed declarations of several "directEmit" methods of classes that subclass
Stmt that were missing a "virtual" keyword.

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

16 years agoTeach ASTContext::tagTypesAreCompatible() about the built-in ObjC types (Class and...
Steve Naroff [Wed, 7 Nov 2007 06:03:51 +0000 (06:03 +0000)]
Teach ASTContext::tagTypesAreCompatible() about the built-in ObjC types (Class and id), removing a bogus warning.

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

16 years agoImplemented serialization of SwitchStmt, CaseStmt, BreakStmt, DefaultStmt,
Ted Kremenek [Wed, 7 Nov 2007 05:25:31 +0000 (05:25 +0000)]
Implemented serialization of SwitchStmt, CaseStmt, BreakStmt, DefaultStmt,
and ParenExpr.

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

16 years agoRewrite ObjC @try/@catch/@finally. Some minor tweaks to the AST nodes...
Steve Naroff [Wed, 7 Nov 2007 04:08:17 +0000 (04:08 +0000)]
Rewrite ObjC @try/@catch/@finally. Some minor tweaks to the AST nodes...

Still need to rewrite @throw (and do more testing)...

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

16 years agoAST for objective-c's @throw statement and its pretty-printing.
Fariborz Jahanian [Wed, 7 Nov 2007 02:00:49 +0000 (02:00 +0000)]
AST for objective-c's @throw statement and its pretty-printing.

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

16 years agoStart struct bit field laout work.
Devang Patel [Wed, 7 Nov 2007 01:57:13 +0000 (01:57 +0000)]
Start struct bit field laout work.
This is far from complete.

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

16 years agoImplemented serialization of LabelStmts.
Ted Kremenek [Wed, 7 Nov 2007 00:48:04 +0000 (00:48 +0000)]
Implemented serialization of LabelStmts.

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

16 years agoFixed a pretty-printer bug whereby a @try statement with no @finally seg faulted.
Fariborz Jahanian [Wed, 7 Nov 2007 00:46:42 +0000 (00:46 +0000)]
Fixed a pretty-printer bug whereby a @try statement with no @finally seg faulted.

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

16 years agoAdded serialization/deserialization of NullStmts.
Ted Kremenek [Wed, 7 Nov 2007 00:40:53 +0000 (00:40 +0000)]
Added serialization/deserialization of NullStmts.

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

16 years agoAdded serialization/deserialization of DeclStmts.
Ted Kremenek [Wed, 7 Nov 2007 00:37:40 +0000 (00:37 +0000)]
Added serialization/deserialization of DeclStmts.
Reordered stmt serialization method implementations to be in alphabetical order.

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

16 years agoOverhauled serialization of statements. We no longer use specialized SerializeTrait...
Ted Kremenek [Wed, 7 Nov 2007 00:17:35 +0000 (00:17 +0000)]
Overhauled serialization of statements.  We no longer use specialized SerializeTrait<> classes,
but methods in Stmt (like other objects we are serializing).  Full serialization of all statements
is not yet complete.

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

16 years agoAdded static inline method "ReadVal" to QualType for more succinct
Ted Kremenek [Wed, 7 Nov 2007 00:13:45 +0000 (00:13 +0000)]
Added static inline method "ReadVal" to QualType for more succinct
deserialization code of objects containing QualTypes.

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

16 years agoRewrite for properties.
Fariborz Jahanian [Wed, 7 Nov 2007 00:09:37 +0000 (00:09 +0000)]
Rewrite for properties.

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

16 years agoFixed typo in the name of "ReadPreamble".
Ted Kremenek [Tue, 6 Nov 2007 23:52:19 +0000 (23:52 +0000)]
Fixed typo in the name of "ReadPreamble".

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

16 years agoFix an inverted conditional,
Fariborz Jahanian [Tue, 6 Nov 2007 23:06:16 +0000 (23:06 +0000)]
Fix an inverted conditional,

--chris

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

16 years agoStarted work on new serialization approach within ASTContext to
Ted Kremenek [Tue, 6 Nov 2007 22:26:16 +0000 (22:26 +0000)]
Started work on new serialization approach within ASTContext to
serialize Type objects in the order they are serialized in the Types
vector.  We also now rely on the methods within ASTContext to unique
Type objects and handle the actual creation of Type objects (these are
now called by the deserialization code).  This approach solves some
hairy issues with ownership of objects and allows us to naturally
handle recursive types.

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

16 years agoQualType deserialization now requires that the underlying pointer type
Ted Kremenek [Tue, 6 Nov 2007 22:23:53 +0000 (22:23 +0000)]
QualType deserialization now requires that the underlying pointer type
must be deserialized without requiring backpatching.

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

16 years agoBug fix: inverted test condition to see if a serialized AST-bitcode
Ted Kremenek [Tue, 6 Nov 2007 22:23:03 +0000 (22:23 +0000)]
Bug fix: inverted test condition to see if a serialized AST-bitcode
file had the correct preamble.

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

16 years agoPatch for objc2's property ASTs, as well as pretty-priting the ASTs.
Fariborz Jahanian [Tue, 6 Nov 2007 22:01:00 +0000 (22:01 +0000)]
Patch for objc2's property ASTs, as well as pretty-priting the ASTs.

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

16 years agoMisc. serialization changes to ASTContext and Decls. Serialization
Ted Kremenek [Tue, 6 Nov 2007 19:51:47 +0000 (19:51 +0000)]
Misc. serialization changes to ASTContext and Decls.  Serialization
for ASTContext is still rapidly evolving.

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

16 years agoRevampled Serialization Tester to serialize and deserialize out an entire ASTContext...
Ted Kremenek [Tue, 6 Nov 2007 19:50:53 +0000 (19:50 +0000)]
Revampled Serialization Tester to serialize and deserialize out an entire ASTContext and top-level decls.

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

16 years agoFix a "basic" bug that resulted in a bogus SourceLocation.
Steve Naroff [Tue, 6 Nov 2007 19:37:09 +0000 (19:37 +0000)]
Fix a "basic" bug that resulted in a bogus SourceLocation.

Off hand, I don't know why this change makes a difference (I thought the two constructor idioms were equivalent).

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

16 years agoimprove decl merging logic to be more correct with
Chris Lattner [Tue, 6 Nov 2007 06:07:26 +0000 (06:07 +0000)]
improve decl merging logic to be more correct with
functions.  Patch contributed by Nuno Lopes, thanks!

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

16 years agoAdd better validation for array types when merging decls. Patch
Chris Lattner [Tue, 6 Nov 2007 04:28:31 +0000 (04:28 +0000)]
Add better validation for array types when merging decls.  Patch
contributed by Oliver Hunt, thanks!

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

16 years agoAdded registration to deserialization engine of IdentifierInfo* as
Ted Kremenek [Mon, 5 Nov 2007 22:42:32 +0000 (22:42 +0000)]
Added registration to deserialization engine of IdentifierInfo* as
IdentifierInfos are deserialized.

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

16 years agoImplemented serialization of TypedefDecls.
Ted Kremenek [Mon, 5 Nov 2007 21:49:34 +0000 (21:49 +0000)]
Implemented serialization of TypedefDecls.
Fixed infinite recursion in VarDecl::InternalRead.

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

16 years agoIn driver code implemented serialization of ASTContext. Working on serialization...
Ted Kremenek [Mon, 5 Nov 2007 21:39:35 +0000 (21:39 +0000)]
In driver code implemented serialization of ASTContext.  Working on serialization of simple ASTs.

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

16 years agoAdded skeleton for dispatch of Decl serialization.
Ted Kremenek [Mon, 5 Nov 2007 21:38:00 +0000 (21:38 +0000)]
Added skeleton for dispatch of Decl serialization.

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

16 years agoFor serialization of ASTContext, added special-casing of serialization
Ted Kremenek [Mon, 5 Nov 2007 20:49:23 +0000 (20:49 +0000)]
For serialization of ASTContext, added special-casing of serialization
of type sets when emitting complex types and pointer types that are
also considered builtins.  These types are automatically created in
the ctor of ASTContext, and thus should not be serialized (was
producing an error during deserialization).

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

16 years agoMisc. fixes. 1) Resurrect meta-data generation turned off by a previous patch.
Fariborz Jahanian [Mon, 5 Nov 2007 17:47:33 +0000 (17:47 +0000)]
Misc. fixes. 1) Resurrect meta-data generation turned off by a previous patch.
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.

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

16 years agoMade methods "Emit" and "Materialize" in ASTContext (used for serialization) public.
Ted Kremenek [Mon, 5 Nov 2007 17:41:25 +0000 (17:41 +0000)]
Made methods "Emit" and "Materialize" in ASTContext (used for serialization) public.

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

16 years agoAdded TypeSerialization.cpp and DeclSerialization.cpp to the XCode project.
Ted Kremenek [Mon, 5 Nov 2007 17:04:40 +0000 (17:04 +0000)]
Added TypeSerialization.cpp and DeclSerialization.cpp to the XCode project.

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

16 years agoSema::ActOnClassMessage()...if a class method isn't found, lookup an instance method...
Steve Naroff [Mon, 5 Nov 2007 15:27:52 +0000 (15:27 +0000)]
Sema::ActOnClassMessage()...if a class method isn't found, lookup an instance method. Since all classes are also instances, this is appropriate.

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

16 years agoDeclare objc_selector outside the prototype for objc_msgSend(), removing a silly...
Steve Naroff [Mon, 5 Nov 2007 14:55:35 +0000 (14:55 +0000)]
Declare objc_selector outside the prototype for objc_msgSend(), removing a silly warning.

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

16 years agoRewrite @selector(sel).
Steve Naroff [Mon, 5 Nov 2007 14:50:49 +0000 (14:50 +0000)]
Rewrite @selector(sel).

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

16 years ago- change the synthesized typedef (for classes) to be of type "objc_object".
Steve Naroff [Mon, 5 Nov 2007 14:36:37 +0000 (14:36 +0000)]
- change the synthesized typedef (for classes) to be of type "objc_object".
- fix a couple bugs in RewriteObjCStringLiteral.
- convert "Class" -> "id" in RewriteMessageExpr.

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

16 years agoRemove HandleObjcMetaDataEmission(), I inadvertantly resurrected it.
Steve Naroff [Mon, 5 Nov 2007 00:25:00 +0000 (00:25 +0000)]
Remove HandleObjcMetaDataEmission(), I inadvertantly resurrected it.

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

16 years agoTwo additions...
Steve Naroff [Sun, 4 Nov 2007 22:37:50 +0000 (22:37 +0000)]
Two additions...

- 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).

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

16 years agoAdd a method prototype slot/getter to the ObjCMessageExpr AST.
Steve Naroff [Sat, 3 Nov 2007 16:37:59 +0000 (16:37 +0000)]
Add a method prototype slot/getter to the ObjCMessageExpr AST.

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

16 years agoImplement rewrite rules for ObjC string constants.
Steve Naroff [Sat, 3 Nov 2007 11:27:19 +0000 (11:27 +0000)]
Implement rewrite rules for ObjC string constants.

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

16 years agoFix ownership model of ParseAST to allow the dtor of
Chris Lattner [Sat, 3 Nov 2007 06:24:16 +0000 (06:24 +0000)]
Fix ownership model of ParseAST to allow the dtor of
ASTConsumer to process the AST before it is destroyed.
This allows elimination of HandleObjcMetaDataEmission.

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

16 years agoProvide both const and non-const accessor methods for @try and @finally ASTs.
Fariborz Jahanian [Sat, 3 Nov 2007 00:38:38 +0000 (00:38 +0000)]
Provide both const and non-const accessor methods for @try and @finally ASTs.
My previous patch did the same for @catch AST.

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

16 years agoProvide const and none-const version of methods accessing various @catch nodes
Fariborz Jahanian [Sat, 3 Nov 2007 00:34:02 +0000 (00:34 +0000)]
Provide const and none-const version of methods accessing various @catch nodes

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

16 years agopretty-print @try/@catch/@finally from AST as the validation of AST.
Fariborz Jahanian [Fri, 2 Nov 2007 18:16:07 +0000 (18:16 +0000)]
pretty-print @try/@catch/@finally from AST as the validation of AST.

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

16 years agoAdded most of the boilerplate code for Decl serialization. Still a few
Ted Kremenek [Fri, 2 Nov 2007 18:05:11 +0000 (18:05 +0000)]
Added most of the boilerplate code for Decl serialization.  Still a few
key functions to implement.

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

16 years agoExpose InsertText, fixing an oversight.
Chris Lattner [Fri, 2 Nov 2007 17:26:47 +0000 (17:26 +0000)]
Expose InsertText, fixing an oversight.

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

16 years agoGenerate code for member exprs.
Anders Carlsson [Fri, 2 Nov 2007 16:59:10 +0000 (16:59 +0000)]
Generate code for member exprs.

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

16 years agoAST for @try statement.
Fariborz Jahanian [Fri, 2 Nov 2007 15:39:31 +0000 (15:39 +0000)]
AST for @try statement.

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

16 years agoUpdated VC++ build system
Hartmut Kaiser [Fri, 2 Nov 2007 01:44:32 +0000 (01:44 +0000)]
Updated VC++ build system

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

16 years agoAST for @finally statement.
Fariborz Jahanian [Fri, 2 Nov 2007 00:18:53 +0000 (00:18 +0000)]
AST for @finally statement.

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

16 years agoAST build for @catch clause (this is work in progress).
Fariborz Jahanian [Thu, 1 Nov 2007 23:59:59 +0000 (23:59 +0000)]
AST build for @catch clause (this is work in progress).

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

16 years agoSimplified Serialization code for SourceLocation and SourceRange, and
Ted Kremenek [Thu, 1 Nov 2007 22:25:41 +0000 (22:25 +0000)]
Simplified Serialization code for SourceLocation and SourceRange, and
updated it to the recently updated Serialization API.

Changed clients of SourceLocation serialization to call the
appropriate new methods.

Updated Decl serialization code to put new skeleton serialization code
in place that is much better than the older trait-specialization
approach.

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

16 years agoBunch of class declarations for objective-c's @try-catch statement.
Fariborz Jahanian [Thu, 1 Nov 2007 21:12:44 +0000 (21:12 +0000)]
Bunch of class declarations for objective-c's @try-catch statement.

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

16 years agoRename classes and collections that maintain record layout information.
Devang Patel [Thu, 1 Nov 2007 19:11:01 +0000 (19:11 +0000)]
Rename classes and collections that maintain record layout information.
Now, at AST level record info is maintained by ASTRecordLayout class.
Now, at code gen  level record info is maintained by CGRecordLayout class.

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

16 years agoImplemented serialization of QualTypes within ASTContext. Clarified
Ted Kremenek [Thu, 1 Nov 2007 18:11:32 +0000 (18:11 +0000)]
Implemented serialization of QualTypes within ASTContext.  Clarified
ownership model of some type pointers.  Added FIXMEs to serialization.

Added comments to ASTContext indicating which variables we are intentionally
*not* serializing.

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

16 years agoRemaining work to collect objective-c's type qualifiers and use them to encode
Fariborz Jahanian [Thu, 1 Nov 2007 17:18:37 +0000 (17:18 +0000)]
Remaining work to collect objective-c's type qualifiers and use them to encode
method types.

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

16 years ago- Remove _interface_ prefix for the synthesized tag names.
Steve Naroff [Thu, 1 Nov 2007 17:12:31 +0000 (17:12 +0000)]
- Remove _interface_ prefix for the synthesized tag names.
- Also removed a tab from the generated struct (minor).

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

16 years agoChanged serialization/deserialization of BuiltinTypes to explicitly serialize
Ted Kremenek [Thu, 1 Nov 2007 17:10:34 +0000 (17:10 +0000)]
Changed serialization/deserialization of BuiltinTypes to explicitly serialize
each type.  This ensures that the order in which the types are serialized
is clear and remains persistent.

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

16 years agoReverted unnecessary inlining of operator!=, since negating operator== is
Ted Kremenek [Thu, 1 Nov 2007 16:35:25 +0000 (16:35 +0000)]
Reverted unnecessary inlining of operator!=, since negating operator== is
just as efficient and much more succinct.

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

16 years agoPropagate bitfield info.
Devang Patel [Thu, 1 Nov 2007 16:29:56 +0000 (16:29 +0000)]
Propagate bitfield info.

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

16 years agoImplement rewrite rule for commenting out protocol references. For example:
Steve Naroff [Thu, 1 Nov 2007 13:24:47 +0000 (13:24 +0000)]
Implement rewrite rule for commenting out protocol references. For example:

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);

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

16 years agoadd support for vector type compatibility checking. Patch by Nate Begeman.
Chris Lattner [Thu, 1 Nov 2007 05:03:41 +0000 (05:03 +0000)]
add support for vector type compatibility checking. Patch by Nate Begeman.

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

16 years agoTweak RewriteInterfaceDecl() to generate a typedef (if one hasn't already been genera...
Steve Naroff [Thu, 1 Nov 2007 03:35:41 +0000 (03:35 +0000)]
Tweak RewriteInterfaceDecl() to generate a typedef (if one hasn't already been generated).

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

16 years agoImplement test/Sema/init.c by treating functions as constants.
Chris Lattner [Thu, 1 Nov 2007 02:45:17 +0000 (02:45 +0000)]
Implement test/Sema/init.c by treating functions as constants.

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

16 years agoPut constant CFStrings in the __DATA,__cfstring section.
Anders Carlsson [Thu, 1 Nov 2007 00:41:52 +0000 (00:41 +0000)]
Put constant CFStrings in the __DATA,__cfstring section.

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

16 years agoStub out codegen for __builtin_constant_p. Remove any implicit cast exprs in the...
Anders Carlsson [Thu, 1 Nov 2007 00:39:26 +0000 (00:39 +0000)]
Stub out codegen for __builtin_constant_p. Remove any implicit cast exprs in the call to __builtin___CFStringMakeConstantString.

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

16 years agoRemove unnecessary method.
Devang Patel [Thu, 1 Nov 2007 00:11:37 +0000 (00:11 +0000)]
Remove unnecessary method.

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

16 years agostart adding pading fields.
Devang Patel [Thu, 1 Nov 2007 00:07:12 +0000 (00:07 +0000)]
start adding pading fields.

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

16 years ago1) More additions for objective-c's qualifier type.
Fariborz Jahanian [Wed, 31 Oct 2007 23:53:01 +0000 (23:53 +0000)]
1) More additions for objective-c's qualifier type.
2) Fixed a test failure (which should have failed all along!).

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

16 years agoFix a typo that prevented pointer-to-int conversions from working.
Anders Carlsson [Wed, 31 Oct 2007 23:18:02 +0000 (23:18 +0000)]
Fix a typo that prevented pointer-to-int conversions from working.

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

16 years agoRefactor code into a separate method.
Devang Patel [Wed, 31 Oct 2007 23:17:19 +0000 (23:17 +0000)]
Refactor code into a separate method.

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

16 years agoFixed a bug exposed by fixing the assert in previous patch (one of the tests asserted).
Fariborz Jahanian [Wed, 31 Oct 2007 23:08:24 +0000 (23:08 +0000)]
Fixed a bug exposed by fixing the assert in previous patch (one of the tests asserted).

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

16 years agoChanged direction of assert. Added more comments.
Fariborz Jahanian [Wed, 31 Oct 2007 22:57:04 +0000 (22:57 +0000)]
Changed direction of assert. Added more comments.

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

16 years agoImplemented more of serialization/deserialization for ASTContext. We now
Ted Kremenek [Wed, 31 Oct 2007 22:44:07 +0000 (22:44 +0000)]
Implemented more of serialization/deserialization for ASTContext.  We now
(hypothetically) read in/write out most of the types.  Bugs likely exist.

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

16 years agoFix two rewriter bugs:
Steve Naroff [Wed, 31 Oct 2007 22:11:35 +0000 (22:11 +0000)]
Fix two rewriter bugs:

- 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;
};
{}

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

16 years agoHandle function calls that return aggregate expressions.
Anders Carlsson [Wed, 31 Oct 2007 22:04:46 +0000 (22:04 +0000)]
Handle function calls that return aggregate expressions.

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

16 years agoMore infrastructure to recognize objective-c's type qualifiers (in,inout, etc.)
Fariborz Jahanian [Wed, 31 Oct 2007 21:59:43 +0000 (21:59 +0000)]
More infrastructure to recognize objective-c's type qualifiers (in,inout, etc.)

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

16 years agoNew test to verify llvm struct layout.
Devang Patel [Wed, 31 Oct 2007 21:02:10 +0000 (21:02 +0000)]
New test to verify llvm struct layout.

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

16 years agoCheck whether next slot meets field type's alignment requirements.
Devang Patel [Wed, 31 Oct 2007 21:01:37 +0000 (21:01 +0000)]
Check whether next slot meets field type's alignment requirements.
If it does not then assert at the moment.

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

16 years agoImplement ObjC built-in types in MinimalAction.
Steve Naroff [Wed, 31 Oct 2007 20:55:39 +0000 (20:55 +0000)]
Implement ObjC built-in types in MinimalAction.

This fixes the recent regression with selector-1.m and -parse-noop.

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

16 years agoImplemented short-circuited version of Builtin::Info::operator!=.
Ted Kremenek [Wed, 31 Oct 2007 20:55:27 +0000 (20:55 +0000)]
Implemented short-circuited version of Builtin::Info::operator!=.

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

16 years agoKeep track of field offsets during structure layout.
Devang Patel [Wed, 31 Oct 2007 20:08:22 +0000 (20:08 +0000)]
Keep track of field offsets during structure layout.
Take 2.

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

16 years agoTake 2.
Devang Patel [Wed, 31 Oct 2007 20:01:01 +0000 (20:01 +0000)]
Take 2.

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

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

16 years agoAdjusted QualType deserialization to reflect updated deserialization API.
Ted Kremenek [Wed, 31 Oct 2007 20:00:03 +0000 (20:00 +0000)]
Adjusted QualType deserialization to reflect updated deserialization API.

We now serialize ivar references inside of ASTContext.

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

16 years agoInitialize MemCpyFn
Devang Patel [Wed, 31 Oct 2007 19:54:57 +0000 (19:54 +0000)]
Initialize MemCpyFn

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

16 years agoFixed problem with rewriting stand-alone @implementation (with no matching @interface).
Fariborz Jahanian [Wed, 31 Oct 2007 18:48:14 +0000 (18:48 +0000)]
Fixed problem with rewriting stand-alone @implementation (with no matching @interface).
A new test case added.

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