Commit Graph

60 Commits

Author SHA1 Message Date
Matt Beaumont-Gay 6e177d3155 sink variable into assert
llvm-svn: 152955
2012-03-16 22:20:39 +00:00
Fariborz Jahanian 1d24a02577 Minor clean up of my last patch.
llvm-svn: 152950
2012-03-16 21:43:45 +00:00
Fariborz Jahanian fe6268e34a modern objective-c translator: write @synchronized.
// rdar://11063663

llvm-svn: 152949
2012-03-16 21:33:16 +00:00
Fariborz Jahanian 52fe6a0da3 modern objective-c translator: writing @throw statement.
llvm-svn: 152931
2012-03-16 16:52:06 +00:00
Fariborz Jahanian b960db4427 modern objective-c translation: writing @try/@catch/@finally
statements.

llvm-svn: 152875
2012-03-15 23:50:33 +00:00
Fariborz Jahanian 3b71b17753 modern objective-c translator: writing @try/@finally statement.
llvm-svn: 152867
2012-03-15 22:42:15 +00:00
Fariborz Jahanian f232bb421a modern objective-c translator: rewriting of @catch-stmt.
llvm-svn: 152830
2012-03-15 20:11:10 +00:00
Fariborz Jahanian b31e3af6fb modern objective-c translator: please symbols generated
for @protocol expression into their own section.

llvm-svn: 152808
2012-03-15 17:05:33 +00:00
Fariborz Jahanian 07a423d652 modern objective-c translator: section info.
and metadata for "non-lazy" class and categories.

llvm-svn: 152751
2012-03-14 23:18:19 +00:00
Fariborz Jahanian ddddca3e6d objective-c modern tranaltor. More section info.
for misc. objc meta-data.

llvm-svn: 152743
2012-03-14 21:44:09 +00:00
Fariborz Jahanian 4548962f00 objective-c modern translator.
Add the _class_ro_t.reserved field for 64bit targets.
// rdar://11040024

llvm-svn: 152731
2012-03-14 18:09:23 +00:00
Fariborz Jahanian fff69d077f objective-c modern rewriter. Do not add _class_ro_t.reserved
field. // rdar://11040024

llvm-svn: 152685
2012-03-13 23:48:09 +00:00
Argyrios Kyrtzidis e7f3ef39bf [Sema] Prefer to use ObjCInterfaceDecl's protocol_begin()/protocol_end() iterators instead of
ObjCInterfaceDecl::getReferencedProtocols(), because the iterators are safe to use
even if the caller did not check that the interface is a definition.

llvm-svn: 152597
2012-03-13 01:09:41 +00:00
Fariborz Jahanian 2cc29afe48 modern objective-c translator. @try/@catch translation. wip.
llvm-svn: 152587
2012-03-12 23:58:28 +00:00
Fariborz Jahanian e47bf2b991 objective-c modern translator: ivar offset symbols
will reside in .objc_ivar$B sections. // rdar://11023490

llvm-svn: 152563
2012-03-12 16:46:58 +00:00
Fariborz Jahanian 008dfe2fb3 objective-c modern abi rewriter: provide section pragmas for
statically writter metadata.
// rdar://11023490

llvm-svn: 152546
2012-03-11 19:41:56 +00:00
David Blaikie bbafb8a745 Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

llvm-svn: 152536
2012-03-11 07:00:24 +00:00
Fariborz Jahanian fca65102a2 objective-c modern rewriter: add __declspec(dllexport) to forward
declaration of class metadata when they are defined later.

llvm-svn: 152500
2012-03-10 18:25:06 +00:00
Fariborz Jahanian b52221e941 objc modern rewriter: Define __OBJC2__ in written file.
// rdar://11024543

llvm-svn: 152496
2012-03-10 17:45:38 +00:00
John McCall 113bee0536 Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr to
track whether the referenced declaration comes from an enclosing
local context.  I'm amenable to suggestions about the exact meaning
of this bit.

llvm-svn: 152491
2012-03-10 09:33:50 +00:00
Fariborz Jahanian c9295ec7d2 objc modern rewriter: don't export @package ivar symbols.
llvm-svn: 152469
2012-03-10 01:34:42 +00:00
Fariborz Jahanian 2677dede22 Minor change to my last rewrite patch.
llvm-svn: 152461
2012-03-10 00:53:02 +00:00
Fariborz Jahanian 34327fcdae objc modern rewriter: Mark class and ivar definitions with __declspec(dllexport)
// rdar://11023563

llvm-svn: 152459
2012-03-10 00:39:34 +00:00
Fariborz Jahanian c2e2ad6486 objective-c modern rewriter. More fixes related to rewriting
ivars in the modern rewriter.

llvm-svn: 152451
2012-03-09 23:46:23 +00:00
Fariborz Jahanian d7a3261dfb objective-c modern translator. Don't ignore unnamed bitfields
when rewriting.

llvm-svn: 152123
2012-03-06 17:16:27 +00:00
Fariborz Jahanian 1dc712f7cc objective-c modern translator. Fixes misc. bug in writing
the ivar offset symbol.

llvm-svn: 151683
2012-02-29 00:26:20 +00:00
Fariborz Jahanian 265a421dd9 Modern objective-c translator. rewriting ivars of aggregate type.
llvm-svn: 151662
2012-02-28 22:45:07 +00:00
Fariborz Jahanian 0ed6cb75a7 Minor modern rewriter bug showed up during testing
against a large project.

llvm-svn: 151395
2012-02-24 21:42:38 +00:00
Fariborz Jahanian dd5a59baed objc modern translator. Fixes writing of block pointer ivar access.
llvm-svn: 151371
2012-02-24 17:35:35 +00:00
Fariborz Jahanian 5e49eb95b5 modern objc translator. more writing of modern ivar access
abi.

llvm-svn: 151176
2012-02-22 18:13:25 +00:00
Fariborz Jahanian 8e1118cbd5 modern objc translator: fixes a bug where a class declaration with not
any implementation in tu was not being translated.

llvm-svn: 151106
2012-02-21 23:58:41 +00:00
Fariborz Jahanian c481c0c0f5 objective-c modern translator. accessing ivars using modern abi - wip.
llvm-svn: 151103
2012-02-21 23:46:48 +00:00
Fariborz Jahanian a7765fea90 modern objc translator. Finish off first cut of the
modern meta-data translation by commenting out private ivar
declarations in user source. Also, added several tests.

llvm-svn: 150985
2012-02-20 20:09:20 +00:00
Fariborz Jahanian 2b383d21dc objective-c modern translator: comment out private ivars
declared in class extension and implementation.

llvm-svn: 150937
2012-02-19 19:00:05 +00:00
Fariborz Jahanian d268b0caba modern objc translator: postpone writing of class definitions
until the end when all their ivars are known then.

llvm-svn: 150844
2012-02-17 22:20:12 +00:00
Fariborz Jahanian 320c88afce modern objc writer: more work for category metadata rewrite
and some cleanup.

llvm-svn: 150839
2012-02-17 20:33:00 +00:00
Fariborz Jahanian f20550543f modern objc translator: category metadata related
patch.

llvm-svn: 150825
2012-02-17 18:40:41 +00:00
Fariborz Jahanian e7a0c93cd9 objective-c translator. More stuff for modern meta-data.
llvm-svn: 150767
2012-02-17 00:06:14 +00:00
Fariborz Jahanian c41d828053 fix the property list metadata name.
llvm-svn: 150728
2012-02-16 21:57:59 +00:00
Fariborz Jahanian 638252fb5a modern objective-c translator: write the root class meta-data.
llvm-svn: 150726
2012-02-16 21:37:05 +00:00
Fariborz Jahanian 0a25688b74 modern objc translator: meta-data generation for first
part of class meta-data.

llvm-svn: 150714
2012-02-16 18:54:09 +00:00
Fariborz Jahanian ff51338772 objective-c translator: fixes an obscure rewriting bug
which attempted to rewrite the same meta-data twice.

llvm-svn: 150618
2012-02-15 22:01:47 +00:00
Fariborz Jahanian fdc06e32cf modern objective-c translator: start writing the main class
meta-data.

llvm-svn: 150548
2012-02-15 00:50:11 +00:00
Fariborz Jahanian bce36774f0 more objective-c translator for modern abi.
metadata for protocol definitions used on
class qualifiers.

llvm-svn: 150498
2012-02-14 19:31:35 +00:00
Fariborz Jahanian b1ba885b49 more modern objc translator. Focusing on metadata for methods.
llvm-svn: 150490
2012-02-14 17:19:02 +00:00
Fariborz Jahanian 1c1da171a8 modern objc translator. More ivar rewrite work.
llvm-svn: 150415
2012-02-13 21:34:45 +00:00
Fariborz Jahanian 75e71b99ec objc modern translator. ivar offset symbols.
llvm-svn: 150413
2012-02-13 20:59:02 +00:00
Fariborz Jahanian c3cdc41ac7 objective-c translator: more rewriting of ivar types
into a c-type which closely matches the objective-c type.

llvm-svn: 150406
2012-02-13 18:57:49 +00:00
Fariborz Jahanian 245534de7a more of rewriting ivar types.
llvm-svn: 150353
2012-02-12 21:36:23 +00:00
Argyrios Kyrtzidis 75627ad8ba Fix the rewriter that broke with r149987.
r149987 changed the way parsing happens inside an @implementation;
it aggregates the declarations inside and reports them together as a DeclGroup.
This had the side effect that function declarations were reported together with
their definition, while the rewriter expected for function declarations to be
reported immediately to the consumer and thus not have a body.

Fix this by having the rewriter actually check with isThisDeclarationADefinition()
to make sure the body comes from the current decl before rewriting it.

llvm-svn: 150325
2012-02-12 04:48:45 +00:00