]> granicus.if.org Git - clang/log
clang
17 years agochange source location to have two bits for macros, tracking
Chris Lattner [Fri, 9 Nov 2007 23:52:16 +0000 (23:52 +0000)]
change source location to have two bits for macros, tracking
whether the location is the start and/or end of an expansion.
These are currently not set or used by anything.

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

17 years agoSome code clean up in the form of name changes for functions which
Fariborz Jahanian [Fri, 9 Nov 2007 22:27:59 +0000 (22:27 +0000)]
Some code clean up in the form of name changes for functions which
process method definitions.

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

17 years agoUpdated VC++ build system
Hartmut Kaiser [Fri, 9 Nov 2007 19:53:21 +0000 (19:53 +0000)]
Updated VC++ build system

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

17 years agoAdded class context to method declarations. Provide "interface *" type
Fariborz Jahanian [Fri, 9 Nov 2007 19:52:12 +0000 (19:52 +0000)]
Added class context to method declarations. Provide "interface *" type
to 'self' method of instance methods.

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

17 years agoInsert invisble arguments to method definition header.
Fariborz Jahanian [Fri, 9 Nov 2007 17:18:29 +0000 (17:18 +0000)]
Insert invisble arguments to method definition header.

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

17 years agoRewrite global variable initializers.
Steve Naroff [Fri, 9 Nov 2007 15:20:18 +0000 (15:20 +0000)]
Rewrite global variable initializers.

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

17 years agoRecognize ObjCStringLiteral as a constant expression.
Steve Naroff [Fri, 9 Nov 2007 15:00:03 +0000 (15:00 +0000)]
Recognize ObjCStringLiteral as a constant expression.

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

17 years ago- add typedef guards.
Steve Naroff [Fri, 9 Nov 2007 12:50:28 +0000 (12:50 +0000)]
- add typedef guards.
- tweak scanForProtocolRefs heuristic.
- disable RewriteInclude() for now.

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

17 years agoChanged method call to reflect updated serialization API.
Ted Kremenek [Fri, 9 Nov 2007 00:43:55 +0000 (00:43 +0000)]
Changed method call to reflect updated serialization API.

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

17 years agoFirst patch toward rewriting of method definitions. This is work in progress.
Fariborz Jahanian [Thu, 8 Nov 2007 23:49:49 +0000 (23:49 +0000)]
First patch toward rewriting of method definitions. This is work in progress.

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

17 years agoremove some temporary code.
Chris Lattner [Thu, 8 Nov 2007 20:53:07 +0000 (20:53 +0000)]
remove some temporary code.

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

17 years agoadd a getAtOffset() member to simplify some code.
Chris Lattner [Thu, 8 Nov 2007 20:51:02 +0000 (20:51 +0000)]
add a getAtOffset() member to simplify some code.

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

17 years agoRewrote serialization of IdentifierInfo and IdentifierTable to use methods Emit
Ted Kremenek [Thu, 8 Nov 2007 19:52:41 +0000 (19:52 +0000)]
Rewrote serialization of IdentifierInfo and IdentifierTable to use methods Emit
and Materialize/Read instead of using specializations of SerializeTrait<>. The
resulting code is much cleaner. We are also setting the stage so that only the
parts of the IdentifierTable that are ever referenced within the ASTs are
serialized, and not the whole table.

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

17 years agoadd a fixme.
Chris Lattner [Thu, 8 Nov 2007 19:40:23 +0000 (19:40 +0000)]
add a fixme.

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

17 years agosignificantly simplify the implementation of RewriteRope by changing the
Chris Lattner [Thu, 8 Nov 2007 19:39:57 +0000 (19:39 +0000)]
significantly simplify the implementation of RewriteRope by changing the
implementation to be list<RopePiece> instead of vector<RopePiece*>.

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

17 years agoRefactored parsing of main function body for reuse by objective-c methods.
Fariborz Jahanian [Thu, 8 Nov 2007 19:01:26 +0000 (19:01 +0000)]
Refactored parsing of main function body for reuse by objective-c methods.

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

17 years agoimprove MakeRopeString to avoid doing a malloc for every 2-character string
Chris Lattner [Thu, 8 Nov 2007 18:32:01 +0000 (18:32 +0000)]
improve MakeRopeString to avoid doing a malloc for every 2-character string
that gets inserted.  This speeds up the rewriter another 10%.

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

17 years agoSimplify interface to MakeRopeString.
Chris Lattner [Thu, 8 Nov 2007 17:59:48 +0000 (17:59 +0000)]
Simplify interface to MakeRopeString.

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

17 years agoFix backwards assert.
Chris Lattner [Thu, 8 Nov 2007 17:56:40 +0000 (17:56 +0000)]
Fix backwards assert.

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

17 years agoImplemented serialization of AddrLabelExpr.
Ted Kremenek [Thu, 8 Nov 2007 16:32:00 +0000 (16:32 +0000)]
Implemented serialization of AddrLabelExpr.
Implemented serialization of ConditionalOperator.
Implemented serialization of StmtExpr.
Fixed bug in serialization of IndirectGoto (did not properly serialize subexpression).

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

17 years agoRewrite RewriteObjCStringLiteral(). This version is simpler (and unlike the previous...
Steve Naroff [Thu, 8 Nov 2007 14:30:50 +0000 (14:30 +0000)]
Rewrite RewriteObjCStringLiteral(). This version is simpler (and unlike the previous one, works:-)

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

17 years agoAdd a new RewriteRope data structure which is a smarter way to represent the text
Chris Lattner [Thu, 8 Nov 2007 07:35:14 +0000 (07:35 +0000)]
Add a new RewriteRope data structure which is a smarter way to represent the text
backing a rewrite buffer than using an std::vector<char>.  This class was hacked
together very quickly and needs to be cleaned up, but it seems to work.  It speeds
up rewriting a a 7M file from 6.43s to 0.24s on my machine.  The impl could also
be made to be a lot more algorithmically sound.

This produces identical output to using vector on this testcase, if it causes a
problems or bugs are encountered, it can be disabled by changing the
RewriteBuffer::Buffer typedef back.

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

17 years agoabstract out buffer type a bit better
Chris Lattner [Thu, 8 Nov 2007 05:42:25 +0000 (05:42 +0000)]
abstract out buffer type a bit better

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

17 years agouse insert instead of replacing 0 bytes with text :)
Chris Lattner [Thu, 8 Nov 2007 04:41:51 +0000 (04:41 +0000)]
use insert instead of replacing 0 bytes with text :)

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

17 years agominor cleanups
Chris Lattner [Thu, 8 Nov 2007 04:41:04 +0000 (04:41 +0000)]
minor cleanups

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

17 years agouse std::copy instead of memcpy for abstraction.
Chris Lattner [Thu, 8 Nov 2007 04:27:23 +0000 (04:27 +0000)]
use std::copy instead of memcpy for abstraction.
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

17 years agoFix a rewriter bug that fariborz hit, when an @interface was the very very very
Chris Lattner [Thu, 8 Nov 2007 04:09:59 +0000 (04:09 +0000)]
Fix a rewriter bug that fariborz hit, when an @interface was the very very very
first thing in the file.

The trick is that text replacement should go after the insert point,
not before it, because it will be replacing text after the point, not before
it.

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

17 years agoRevised serialization of CaseStmt to emit all of the owned pointers (its
Ted Kremenek [Thu, 8 Nov 2007 00:56:26 +0000 (00:56 +0000)]
Revised serialization of CaseStmt to emit all of the owned pointers (its
subexpressions) all together in one block at the end.

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

17 years agoImplemented serialization of CompoundAssignOperator.
Ted Kremenek [Thu, 8 Nov 2007 00:41:37 +0000 (00:41 +0000)]
Implemented serialization of CompoundAssignOperator.

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

17 years agoAdd assert for the case that is not handled.
Devang Patel [Thu, 8 Nov 2007 00:32:12 +0000 (00:32 +0000)]
Add assert for the case that is not handled.
struct { char a; short b:2; };

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

17 years agoImplemented serialization of UnaryOperator.
Ted Kremenek [Thu, 8 Nov 2007 00:26:24 +0000 (00:26 +0000)]
Implemented serialization of UnaryOperator.

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

17 years agoKeep track of beginning offset for the bit field that does not start at byte boundry.
Devang Patel [Thu, 8 Nov 2007 00:17:59 +0000 (00:17 +0000)]
Keep track of beginning offset for the bit field that does not start at byte boundry.

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

17 years agoImplemented serialization of CallExpr.
Ted Kremenek [Wed, 7 Nov 2007 23:32:20 +0000 (23:32 +0000)]
Implemented serialization of CallExpr.

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

17 years agoImplemented serialization of ArraySubscriptExpr.
Ted Kremenek [Wed, 7 Nov 2007 22:53:01 +0000 (22:53 +0000)]
Implemented serialization of ArraySubscriptExpr.
Added "using ..." for "Serializer" and "Deserializer" to reduce amount
of typing for serialization methods.

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

17 years agoImplemented serialization of CastExpr.
Ted Kremenek [Wed, 7 Nov 2007 22:42:34 +0000 (22:42 +0000)]
Implemented serialization of CastExpr.

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

17 years agoImplemented serialization of ImplicitCastExpr.
Ted Kremenek [Wed, 7 Nov 2007 22:39:17 +0000 (22:39 +0000)]
Implemented serialization of ImplicitCastExpr.

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

17 years agoModified serialization of BinaryOperator and CaseStmt to use the new
Ted Kremenek [Wed, 7 Nov 2007 22:32:23 +0000 (22:32 +0000)]
Modified serialization of BinaryOperator and CaseStmt to use the new
BatchEmitOwnedPtrs() and BatchReadOwnedPtrs() methods.

Modified serialization of all Stmts to start their own record in the bitstream.

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

17 years agoStay within 80 columns.
Devang Patel [Wed, 7 Nov 2007 21:04:59 +0000 (21:04 +0000)]
Stay within 80 columns.

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

17 years agoUpdated VC++ build system
Hartmut Kaiser [Wed, 7 Nov 2007 19:34:40 +0000 (19:34 +0000)]
Updated VC++ build system

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

17 years agoImplemented serialization of StringLiteral.
Ted Kremenek [Wed, 7 Nov 2007 19:08:19 +0000 (19:08 +0000)]
Implemented serialization of StringLiteral.

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

17 years agoImplemented serialization of ImaginaryLiteral.
Ted Kremenek [Wed, 7 Nov 2007 18:53:02 +0000 (18:53 +0000)]
Implemented serialization of ImaginaryLiteral.

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

17 years agoImplemented serialization of FloatingLiteral.
Ted Kremenek [Wed, 7 Nov 2007 18:45:55 +0000 (18:45 +0000)]
Implemented serialization of FloatingLiteral.

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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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