Ted Kremenek
4f50ee3e6d
Implemented serialization for TypedefType.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43423 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-28 21:21:04 +00:00
Ted Kremenek
4340bfa9f4
Implemented serialization of FunctionTypeProto.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43419 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-28 00:59:26 +00:00
Ted Kremenek
e81e24c84b
Implemented serialization of FunctionTypeNoProto.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43418 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-27 19:58:08 +00:00
Ted Kremenek
71ac846a4e
Implemented serialization for VectorType.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43417 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-27 19:05:09 +00:00
Ted Kremenek
a4cb4525cf
More work on type serialization: added support for serializing BuiltinTypes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43414 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 23:52:52 +00:00
Fariborz Jahanian
4d733d3288
Path to synthesize 'instance' size field of _objc_class metadata.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43409 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 23:09:28 +00:00
Ted Kremenek
bc26c58f3d
Completed serialization of ConstantArrayTypes (now that APInt serialization is in place).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43407 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 22:00:08 +00:00
Steve Naroff
bef1185418
Start rewriting ObjC interfaces. As a start, we comment out all the methods. This involved refining how the parser/AST passes/manages SourceLocations for ObjcMethodDecl's.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43404 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 20:53:56 +00:00
Fariborz Jahanian
7780d2d52b
This patch allows synthesis generation of ivar offset for legacy objective-c @implementation
...
decl without an @interface decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43403 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 20:50:24 +00:00
Ted Kremenek
73af669633
Added skeleton implementation of serialization for types (not complete).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43397 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 20:24:35 +00:00
Fariborz Jahanian
26e4cd331c
Patch to synthesize computation of Ivar offset in rewritten c file.
...
Thanks to Steve N. to point out using of offsetof for this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43391 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 19:46:17 +00:00
Devang Patel
abad06cfd0
Codegen union member references.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43390 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 19:42:18 +00:00
Devang Patel
0a96118bb8
Handle non LValue base expressions.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43387 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 18:15:21 +00:00
Devang Patel
e40daa4e84
Code gen static initializer.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43386 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 17:50:58 +00:00
Devang Patel
636c3d0467
Codegen array initializers.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43385 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 17:44:44 +00:00
Devang Patel
8e53e720b3
Codegen global array initializers.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43383 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 16:31:40 +00:00
Fariborz Jahanian
edcfb42e5e
Pretty printing for ivar list of an interface block.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43382 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26 16:29:12 +00:00
Hartmut Kaiser
00a1ef57b6
Disambiguated variable name to comply with VC++'s archaic variable scoping rules.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43371 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 22:59:17 +00:00
Hartmut Kaiser
d22b492e28
Updated VC++ build system
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43370 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 22:58:31 +00:00
Ted Kremenek
b990f1834b
Modified StmtIterator to now include visiting the initialization expression for EnumConstantDecls.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43366 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 22:24:19 +00:00
Devang Patel
f86206ffbf
Fix "strbuf += stufflen;" crash.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43365 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 22:19:13 +00:00
Devang Patel
5825ac2950
Document ConvertNewType() method and make it a private method.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43363 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 21:40:12 +00:00
Ted Kremenek
f152b2ee87
Added DeclSerialization.cpp to XCode project.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43362 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 21:39:10 +00:00
Ted Kremenek
2f1f8cb1b8
Added skeleton for Decl serialization.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43361 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 21:37:16 +00:00
Fariborz Jahanian
ccd87b07a7
Refactored several meta data for reusability.
...
Changed the entire rewrite of metadata to write to std::string
object instead of stdout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43360 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 20:55:25 +00:00
Devang Patel
30ec9972be
Cache llvm::Type through PATypeHolder.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43355 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 18:32:36 +00:00
Ted Kremenek
0a449eed1d
changed #include of Serialization.h to SerializationFwd.h to reduce
...
compilation time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43354 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 18:27:10 +00:00
Chris Lattner
e61933ddb9
Fix a recovery bug Fariborz and I noticed yesterday. We were producing:
...
method.c:4:3: error: use of undeclared identifier 'BADIDENT'
&BADIDENT, 0
^
method.c:5:2: error: expected '}'
};
^
method.c:3:14: error: to match this '{'
struct S A = {
^
now we only produce:
method.c:4:3: error: use of undeclared identifier 'BADIDENT'
&BADIDENT, 0
^
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43349 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 17:27:01 +00:00
Chris Lattner
d6690b20b3
simplify change.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43348 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 17:18:59 +00:00
Chris Lattner
075eb6eae0
Fix a bug steve noticed when handling nested rewrites. We now turn this:
...
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
into:
NSAutoreleasePool * pool = objc_msgSend(objc_msgSend(objc_getClass("NSAutoreleasePool"), sel_getUid("alloc")), sel_getUid("init"));
instead of:
NSAutoreleasePool * pool = objc_msgSend(objc_msgSend(objc_getClass("NSAutoreleasePool"), sel_getUid("alloc")), sel_getUid("init"))utoreleasePool"), sel_getUid("alloc")) init];
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43347 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 17:17:34 +00:00
Chris Lattner
158ecb9767
Convert one type of metadata to use std::string instead of
...
printf as an example.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43346 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 17:07:24 +00:00
Ted Kremenek
a194bc6018
Added SourceLocation.cpp to XCode project.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43344 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 16:03:53 +00:00
Ted Kremenek
19a95bcf35
Implemented serialization of SourceLocation and SourceRange objects.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43343 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 16:02:43 +00:00
Ted Kremenek
cc326204dd
Added constness to accessors in CompoundStmt.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43342 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 15:39:09 +00:00
Chris Lattner
27437caade
Add a new ChooseExpr::isConditionTrue method to unify
...
some code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43322 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 00:29:32 +00:00
Fariborz Jahanian
8e991ba2e2
Refactored RewriteObjcMethodsMetaData to better rewrite
...
instance/class methods metadata.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43320 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 00:14:44 +00:00
Ted Kremenek
54395d440d
Added accessors to CompoundStmt to retrieve the source locations for the
...
left and right bracket. This is useful for serialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43318 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-25 00:08:50 +00:00
Devang Patel
c5d3d72bac
Remove unused #includes
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43317 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 23:42:18 +00:00
Steve Naroff
934f276cc5
More work on translating message expressions.
...
Still to do:
- Chris will fix a bug in the rewriting engine for nested stmts. For example, the following:
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
tranlates to:
NSAutoreleasePool * pool = objc_msgSend(objc_msgSend(objc_getClass("NSAutoreleasePool"), sel_getUid("alloc")), sel_getUid("init"))utoreleasePool"), sel_getUid("alloc")) init];
...which is correct, except there is garbage after sel_getUid("init"). This is because the rewriter isn't updating the extent of the containing message expression.
- Do the crazy cast thang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43316 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 22:48:43 +00:00
Devang Patel
126a856ecd
Handle
...
foo()->a = 42;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43315 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 22:26:28 +00:00
Fariborz Jahanian
1a0965effc
Remove explicit use of size of known structs in metadata generation.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43313 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 21:25:12 +00:00
Fariborz Jahanian
454cb012a9
Couple of minor changes. 1) Metaclass metadata also has a reference to
...
protocol meta-data (unlike what documentation says). 2) Include objc.h so,
we can compile the generated metadata with both gcc and clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43311 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 20:54:23 +00:00
Devang Patel
057afddf0f
Move RecordOrganizer into CodeGenTypes.cpp
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43310 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 20:38:06 +00:00
Fariborz Jahanian
2e6d935930
Refactord instance and class metadata emission. Refactored protocols metadata emission.
...
Implemented emission of category metadata,
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43308 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 19:23:36 +00:00
Ted Kremenek
a2bfb91c55
Modified current clients of Bitcode-Object serialization to use the
...
new split-header file configuration (Serialize.h and Deserialize.h)
now in place in the core LLVM repository.
Removed unneeded SerializeTrait specializations for enums in
TokenKinds.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43306 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 19:06:02 +00:00
Devang Patel
a83cc33195
Handle non-constant initializers.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43301 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 18:05:48 +00:00
Devang Patel
35634f5ed6
Visit CompoundLiteralExpr and InitListExpr
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43300 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 17:18:43 +00:00
Chris Lattner
f04da13728
Fix some long lines, move code around into logical groups.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43299 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 17:06:59 +00:00
Chris Lattner
e64b7771dc
Use Ted's new mutable child iterators to update the tree as we rewrite it.
...
This will make nested subexprs work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43296 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 16:57:36 +00:00
Ted Kremenek
22c0fcba14
Modified operator* for StmtIterator to return Stmt*& instead of Stmt*.
...
This permits in-place replacement of the original AST statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43295 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 16:52:34 +00:00