While the diff is large, the idea is very simple. When we parse method definitions (in an @implementation), we need to add them incrementally (rather than wait until the @end).
Other details...
- Renamed Sema::ActOnAddMethodsToObjcDecl() to Sema::ActOnAtEnd(). The methods are now optional arguments.
- Removed Parser::AllImplMethods (a nice cleanup).
- Added location info to ObjcImplementationDecl (since we will need it very soon:-)
- Modified message.m test to no longer allow the bogus diagnostic.
llvm-svn: 43995
(1) serialize out top-level decls BEFORE serializing out translation unit
structures like ASTContext.
(2) deserialize out translation unit structures like ASTContext before
top-level decls by first skipping the decls in the bitstream, deserializing
ASTContext and friends, and then jumping back to the bitstream block with the
decls and then deserializing them.
Change (1) allows us to utilize the pointer-tracking system in the Serializer
to only serialize out metadata that is actually referenced by the ASTS.
Change (2) allows us to deserialize the metadata first as before, which
signficantly reduces the amount of pointer backpatching the deserializer
would have to do if the decls were deserialized first.
llvm-svn: 43974
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.
llvm-svn: 43880
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.
llvm-svn: 43716
- 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).
llvm-svn: 43685
Make target info available to clang code generator. This is far from complete but this helps clang codegen module make progress.
At the moment target triplet and target description strings are hard coded in clang::TargetInfo
llvm-svn: 43572
I need to (finally) change the way Class/id/SEL/IMP are built-in...the current approach of doing it in the preprocessor is "broken". The other problem is Sema::GetObjcIdType/GetObjcSelType/GetObjcClassType, the hooks that initialize ASTContext lazily. These built-in types need to be done up front...
llvm-svn: 43557