Commit Graph

40 Commits

Author SHA1 Message Date
Anders Carlsson 81a5a69682 Store inline asm code in the AST.
llvm-svn: 44255
2007-11-20 19:21:03 +00:00
Ted Kremenek f115550f6f Added assertion in serialization of DeclRefExprs. DeclRefExprs can only
own the decl they reference if it is a FunctionDecl.  Note that his
ownership property is still considered a hack, and should be fixed.

llvm-svn: 44192
2007-11-16 19:00:35 +00:00
Ted Kremenek 07941e21e9 Added hack when serializing DeclRefExprs. This should probably be fixed.
Some FunctionDecls do not appear at the top-level or are owned by a DeclStmt.
In calls to implicitly defined functions, a FunctionDecl is created, but only
the DeclRefExprs reference them. Since an implicitly defined function may be
called multiple times, there is no clear ownership model for such objects.

Temporary solution: when serializing out DeclRefExprs, emit an ownership bit
for the Decl. This bit is determined by querying the serializer to see if the
Decl has already been serialized. If it hasn't, emit the Decl as an owned
pointer.

I repeat: this is a hack.  This should be fixed.

llvm-svn: 44176
2007-11-15 18:26:39 +00:00
Ted Kremenek 4791e1a7bd Started separate section for method definitions for ObjC serialization.
Added missing deserialization case in Stmt::Create() switch statement.

llvm-svn: 44175
2007-11-15 18:10:29 +00:00
Ted Kremenek e25b79ff84 Implemented serialization of InitListExpr.
llvm-svn: 44137
2007-11-14 21:31:46 +00:00
Ted Kremenek 3db07a7016 Implemented serialization of CompoundLiteralExpr.
llvm-svn: 44134
2007-11-14 21:18:36 +00:00
Ted Kremenek 049059a7db Implemented serialization of AsmStmt (or rather what is currently implemented
in AsmStmt).

llvm-svn: 44077
2007-11-13 22:55:51 +00:00
Ted Kremenek da551c3b1e Implemented serialization for SizeOfAlignOfTypeExpr.
llvm-svn: 44075
2007-11-13 22:30:29 +00:00
Ted Kremenek b8f51d5512 Implemented serialization for MemberExpr.
llvm-svn: 44074
2007-11-13 22:16:23 +00:00
Ted Kremenek e9b83bbd68 Renamed all serialization "Materialize" methods to "Create" to conform with
the new serialization API.

llvm-svn: 44035
2007-11-13 00:25:37 +00:00
Ted Kremenek 0035bf33c4 In Stmt serialization, renamed directEmit to EmitImpl and
directMaterialize to CreateImpl.

llvm-svn: 44020
2007-11-12 18:04:32 +00:00
Steve Naroff e46504b278 Implement instance variable references.
llvm-svn: 44016
2007-11-12 14:29:37 +00:00
Ted Kremenek f2d68452c6 Implemented serialization of AddrLabelExpr.
Implemented serialization of ConditionalOperator.
Implemented serialization of StmtExpr.
Fixed bug in serialization of IndirectGoto (did not properly serialize subexpression).

llvm-svn: 43891
2007-11-08 16:32:00 +00:00
Ted Kremenek a34b057762 Revised serialization of CaseStmt to emit all of the owned pointers (its
subexpressions) all together in one block at the end.

llvm-svn: 43862
2007-11-08 00:56:26 +00:00
Ted Kremenek c1cddef7c9 Implemented serialization of CompoundAssignOperator.
llvm-svn: 43860
2007-11-08 00:41:37 +00:00
Ted Kremenek 2419ac8792 Implemented serialization of UnaryOperator.
llvm-svn: 43858
2007-11-08 00:26:24 +00:00
Ted Kremenek 766fc8c14a Implemented serialization of CallExpr.
llvm-svn: 43854
2007-11-07 23:32:20 +00:00
Ted Kremenek 2c325386b8 Implemented serialization of ArraySubscriptExpr.
Added "using ..." for "Serializer" and "Deserializer" to reduce amount
of typing for serialization methods.

llvm-svn: 43849
2007-11-07 22:53:01 +00:00
Ted Kremenek e87ceeeb4a Implemented serialization of CastExpr.
llvm-svn: 43848
2007-11-07 22:42:34 +00:00
Ted Kremenek b2b5e73f89 Implemented serialization of ImplicitCastExpr.
llvm-svn: 43847
2007-11-07 22:39:17 +00:00
Ted Kremenek 9d2bf704de 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.

llvm-svn: 43846
2007-11-07 22:32:23 +00:00
Ted Kremenek d68db575f3 Implemented serialization of StringLiteral.
llvm-svn: 43834
2007-11-07 19:08:19 +00:00
Ted Kremenek f9062be688 Implemented serialization of ImaginaryLiteral.
llvm-svn: 43833
2007-11-07 18:53:02 +00:00
Ted Kremenek 569725f827 Implemented serialization of FloatingLiteral.
llvm-svn: 43832
2007-11-07 18:45:55 +00:00
Ted Kremenek c874c6a959 Implemented serialization of CharacterLiteral.
llvm-svn: 43824
2007-11-07 17:15:49 +00:00
Ted Kremenek 3c58662411 Implemented serialiation of PreDefinedExpr.
llvm-svn: 43823
2007-11-07 17:11:58 +00:00
Ted Kremenek d47c8125a1 Implemented serialization of ContinueStmt.
llvm-svn: 43822
2007-11-07 17:05:07 +00:00
Ted Kremenek 3b4c08deae Implemented serialization of IndirectGotoStmt.
Added "FIXME" regarding the lack of source location information for IndirectGotoStmt.

llvm-svn: 43821
2007-11-07 17:02:32 +00:00
Ted Kremenek 5fd3040c57 Implemented serialization of GotoStmt.
llvm-svn: 43818
2007-11-07 08:07:46 +00:00
Ted Kremenek 35e20410aa Implemented serialization for ForStmt.
llvm-svn: 43817
2007-11-07 08:02:55 +00:00
Ted Kremenek 83e96b8d5a Implemented serialization of DoStmt.
llvm-svn: 43816
2007-11-07 07:53:55 +00:00
Ted Kremenek f6d8ce1052 Implemented serialization for WhileStmt.
llvm-svn: 43815
2007-11-07 07:50:10 +00:00
Ted Kremenek 154c790538 Implemented serialization of IfStmt.
Fixed declarations of several "directEmit" methods of classes that subclass
Stmt that were missing a "virtual" keyword.

llvm-svn: 43814
2007-11-07 07:19:30 +00:00
Ted Kremenek acb9bcf22a Implemented serialization of SwitchStmt, CaseStmt, BreakStmt, DefaultStmt,
and ParenExpr.

llvm-svn: 43806
2007-11-07 05:25:31 +00:00
Ted Kremenek a8cdf31aa0 Implemented serialization of LabelStmts.
llvm-svn: 43800
2007-11-07 00:48:04 +00:00
Ted Kremenek ad1bc400d7 Added serialization/deserialization of NullStmts.
llvm-svn: 43797
2007-11-07 00:40:53 +00:00
Ted Kremenek 80fe8904e1 Added serialization/deserialization of DeclStmts.
Reordered stmt serialization method implementations to be in alphabetical order.

llvm-svn: 43796
2007-11-07 00:37:40 +00:00
Ted Kremenek 148aa5edbc 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.

llvm-svn: 43793
2007-11-07 00:17:35 +00:00
Ted Kremenek 5e2eb261af 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.

llvm-svn: 43625
2007-11-01 22:25:41 +00:00
Ted Kremenek e32c067cc4 Preliminary support for serializing statements.
llvm-svn: 43566
2007-10-31 18:41:19 +00:00