Eli Friedman
401675b0de
Minor code cleanup.
...
llvm-svn: 47530
2008-02-23 07:32:49 +00:00
Ted Kremenek
652d18e37c
Patch from Argiris Kirtzidis:
...
The patch fixes some debug assertions that the msvcrt throws:
1)
- if (isprint(value) && value < 256) {
+ if (value < 256 && isprint(value)) {
isprint() does an assertion check of its own for value < 256; check value before calling it to prevent it.
2)
- Stmt->Names.push_back(std::string(&data[0], data.size()));
+ if (data.size() == 0)
+ Stmt->Names.push_back(std::string());
+ else
+ Stmt->Names.push_back(std::string(&data[0], data.size()));
If data.size() == 0 then data[0] throws "out of range" assertion.
llvm-svn: 47512
2008-02-23 00:52:04 +00:00
Ted Kremenek
4aa77cee11
Minor reordering of the serialization of the fields of MemberExpr to result
...
in a smaller encoding on disk.
llvm-svn: 46832
2008-02-06 23:03:14 +00:00
Eli Friedman
1242fff6ec
Make sure to propagate qualifiers through the member operator.
...
llvm-svn: 46830
2008-02-06 22:48:16 +00:00
Anders Carlsson
19fe116fc0
Handle simple asm statements correctly.
...
llvm-svn: 46777
2008-02-05 23:03:50 +00:00
Ted Kremenek
a496584c82
For ObjCAtCatchStmt, removed field 'NextAtCatchStmt' (which referenced the next @catch )
...
and put the the next ObjcAtCatchStmt* as part of SubExprs. This fixes a bug with
iterating over the children of ObjcAtCatch, where the next @catch was not
properly being iterated over as a child.
Altered serialization of ObjCAtCatchStmt to reflect this new layout of
its subexpressions, and fixed an ownership issue with the next @catch not
being serialized as an owned pointer.
llvm-svn: 46647
2008-02-01 21:28:59 +00:00
Fariborz Jahanian
284011b462
Rewriting of @synchronized. This has one FIXME in it. But this should allow @sychronized to be rewritten.
...
llvm-svn: 46533
2008-01-29 22:59:37 +00:00
Ted Kremenek
15ad4cf46b
- Hooked up deserialization of ObjCAtSynchronizedStmt Stmt::Create().
...
- Some minor optimizations of the encoding format for ObjCAtSynchronizedStmt.
- Reordered methods so that the deserialization methods for
ObjCAtSynchronizedStmt appear in alphabetical order with the corresponding
methods of the other AST nodes.
llvm-svn: 46529
2008-01-29 21:21:30 +00:00
Fariborz Jahanian
48085b86ae
AST for @synchronized.
...
llvm-svn: 46524
2008-01-29 19:14:59 +00:00
Ted Kremenek
a018a2c0f4
When serializing CompoundLiteralExpr, serialize out the file scope flag before
...
serializing the subexpression (Init), as this results in a more efficient
encoding in the bitstream.
llvm-svn: 45967
2008-01-14 18:29:39 +00:00
Steve Naroff
d32419de0d
Record if a compound literal expression is @ file scope. This allows us to implement C99 6.5.2.5p6. This could have been done without modifying the AST (by checking the decl type and passing the info down to isContextExpr), however we concluded this is more desirable.
...
Bug/patch by Eli Friedman!
llvm-svn: 45966
2008-01-14 18:19:28 +00:00
Fariborz Jahanian
82ae0152a7
Allow messaging expression as foreach's collection expression.
...
llvm-svn: 45793
2008-01-10 00:24:29 +00:00
Ted Kremenek
1b0ea82459
Substituted all instances of the string "Objc" for "ObjC". This fixes
...
some naming inconsistencies in the names of classes pertaining to Objective-C
support in clang.
llvm-svn: 45715
2008-01-07 19:49:32 +00:00
Ted Kremenek
dabea046f6
Minor tweak to serialization of ObjcForCollectionStmt: the three owned pointers
...
are now emitted in a batch, which reduces the metadata overhead in the
serialized bitcode.
llvm-svn: 45710
2008-01-07 18:35:04 +00:00
Ted Kremenek
e84b32e506
Moved serialization code for ObjcForCollectionStmt to be in alphabetical order
...
with the rest of the Objective-C serialization code.
llvm-svn: 45609
2008-01-05 00:57:49 +00:00
Fariborz Jahanian
3622e5954b
Minor changes as suggested by Chris L.
...
llvm-svn: 45598
2008-01-04 23:04:08 +00:00
Fariborz Jahanian
8361552af9
New declarations/defs for Objc2's foreach-statement. This is work in progress.
...
llvm-svn: 45511
2008-01-02 22:54:34 +00:00
Chris Lattner
266a2ff3ac
Compute the proper sourcerange for an CompoundLiteralExpr.
...
llvm-svn: 45504
2008-01-02 21:46:24 +00:00
Chris Lattner
5b12ab8c93
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change.
llvm-svn: 45410
2007-12-29 19:59:25 +00:00
Ted Kremenek
90a7c12bb4
Implemented serialization of: ObjCEncodeExpr, ObjCSelectorExpr.
...
llvm-svn: 44593
2007-12-05 00:43:08 +00:00
Ted Kremenek
c8f444ff80
Implemented serialization of ObjCStringLiteral.
...
llvm-svn: 44568
2007-12-04 00:51:11 +00:00
Ted Kremenek
b8714c8ef1
Implemented serialization for ObjcAtThrowStmt.
...
llvm-svn: 44567
2007-12-04 00:40:49 +00:00
Ted Kremenek
98b3a71537
Implemented serialization of ObjcAtTryStmt.
...
llvm-svn: 44566
2007-12-04 00:38:30 +00:00
Ted Kremenek
ee695a3456
Implemented serialization for ObjcAtFinallyStmt.
...
llvm-svn: 44564
2007-12-04 00:32:22 +00:00
Ted Kremenek
0bf3e33dcc
Implemented serialization for ObjcAtCatchStmt.
...
llvm-svn: 44563
2007-12-04 00:28:54 +00:00
Ted Kremenek
3a2c950401
Added "isExact" field to FloatingLiteral. This flag indicates whether or not
...
the APFloat representing the parsed literal can represent the literal value
exactly. This is useful when performing various semantic checks on the code,
and issuing appropriate warnings to users.
llvm-svn: 44423
2007-11-29 00:56:49 +00:00
Anders Carlsson
660bdd1c87
Keep track of whether the asm is volatile or not.
...
llvm-svn: 44297
2007-11-23 23:12:25 +00:00
Anders Carlsson
94ea8aab34
Store output and input operands as well as clobber information in the AsmStmt. Ted, could you please review the serialization/deserialization code?
...
llvm-svn: 44266
2007-11-22 01:36:19 +00:00
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