summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCGNU.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Update for LLVM API change.Owen Anderson2009-07-271-7/+7
| | | | llvm-svn: 77267
* Update for LLVM API change.Owen Anderson2009-07-241-26/+26
| | | | llvm-svn: 77012
* Fix declaration of obc_enumerationMutation function, for GNU runtime.Daniel Dunbar2009-07-241-6/+10
| | | | llvm-svn: 76959
* Revert r75641.Anders Carlsson2009-07-181-1/+1
| | | | llvm-svn: 76327
* fix objc codegen to not have its own list of things that eventually get into ↵Chris Lattner2009-07-171-4/+0
| | | | | | | | llvm.used, just populate CGM's list directly. llvm-svn: 76266
* Update for LLVM API change, and contextify a bunch of related stuff.Owen Anderson2009-07-141-144/+149
| | | | llvm-svn: 75705
* Rename RecordLayout.h to ASTRecordLayout.hAnders Carlsson2009-07-141-1/+1
| | | | llvm-svn: 75641
* Update for LLVM API change.Owen Anderson2009-07-131-1/+1
| | | | llvm-svn: 75446
* This patch includes a conceptually simple, but very intrusive/pervasive change. Steve Naroff2009-07-101-4/+5
| | | | | | | | | | | | The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches. This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic. By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks. llvm-svn: 75314
* Update for IRBuilder API change.Owen Anderson2009-07-081-1/+1
| | | | llvm-svn: 75041
* Update for LLVM API change.Owen Anderson2009-07-081-22/+21
| | | | llvm-svn: 75028
* Update for LLVM API change.Owen Anderson2009-07-081-13/+15
| | | | llvm-svn: 74986
* Implemented memmove_collectable API for Next runtimeFariborz Jahanian2009-07-081-0/+11
| | | | | | | when struct variables with GC'able members are copied into. Will provide a test case later. llvm-svn: 74984
* This fixes the case where the wrong symbol is emitted leading to linking ↵Fariborz Jahanian2009-07-031-4/+9
| | | | | | | | errors when you reference a class before defining it (GNU runtime). Patch by David Chisnall. llvm-svn: 74772
* use new and simplified LLVM APIs. Patch by Jay Foad!Chris Lattner2009-07-011-3/+2
| | | | llvm-svn: 74585
* De-ASTContext-ify DeclContext.Argyrios Kyrtzidis2009-06-301-14/+9
| | | | | | | Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. llvm-svn: 74506
* Patch fixes an obscure bug when 'used' attribute is applied toFariborz Jahanian2009-06-231-0/+5
| | | | | | | | | variables in ObjC's Next runtime mode. Next runtime also implicitly applies 'used' attribute on some of its meta-data. This results in two 'llvm.used' arrays to be generated, and one of them is renamed to 'llvm.used1'. llvm-svn: 74008
* "GCC emits an __objc_class_name_{classname} symbol for every class, and a ↵Chris Lattner2009-06-151-4/+29
| | | | | | | | corresponding reference to this symbol for every compilation unit that references the class. This causes linker errors when you try linking a program which references some classes but doesn't define them. The attached patch implements this support in clang, so you can compile a class with clang, reference it in a file compiled with GCC, and have it all work correctly." Patch by David Chisnall! llvm-svn: 73364
* Cleanup/Refactoring of ivar collection. No change in functionality.Fariborz Jahanian2009-06-041-7/+1
| | | | llvm-svn: 72827
* This patch adds support for sender-aware dispatch in Objective-C for the GNU ↵Fariborz Jahanian2009-05-221-6/+27
| | | | | | | | | | runtime, when compiled with -fobjc-sender-dependent-dispatch. This is used in AOP, COP, implementing object planes, and a few other things. Patch by David Chisnall. llvm-svn: 72275
* This patch provides preliminary support for non-fragile instance variables ↵Fariborz Jahanian2009-05-201-3/+74
| | | | | | | | | | | | on the GNU runtime. It currently requires a patches to GNU libobjc (and so is not enabled by default) which are currently being tested and reviewed by GNUstep before being pushed upstream. This patch does not allow support for synthesized ivars, but does provide the infrastructure needed for supporting them. Patch by David Chisnall llvm-svn: 72175
* This patch allows clang to generate code for declared properties on the GNU ↵Fariborz Jahanian2009-05-191-2/+28
| | | | | | | | runtime. As with @synchronized, this requires some extra functions that are included with other libraries (not with the GNU runtime itself) and so will cause linker errors when these are not present. Patch by David Chisnall. llvm-svn: 72079
* This patch fixes two bugs in the GNU Objective-C runtime implementation. ↵Fariborz Jahanian2009-05-171-14/+34
| | | | | | | | One is a case in rethrowing exceptions where the C types don't match correctly (I already sent this patch to Daniel Dunbar, who found the bug, so it may have already been committed). The other fixes the case properties so that the methods generated as property accessors are added to the class structure correctly. Patch by David Chisnall. llvm-svn: 71980
* More improvements for GNU runtime objc EH, patch by David Chisnall!Chris Lattner2009-05-111-2/+36
| | | | llvm-svn: 71451
* further improvements to gnu objc EH stuff, patch by David Chisnall!Chris Lattner2009-05-081-15/+15
| | | | llvm-svn: 71227
* "This patch fixes message sends to super in categories for the GNU runtime. ↵Chris Lattner2009-05-081-17/+31
| | | | | | | | This used to work, but I broke it when I modified the code to emit the same thing as GCC for message sends to super in classes." Patch by David Chisnall! llvm-svn: 71220
* initial support for ObjC exceptions with the GNU runtime:Chris Lattner2009-05-081-2/+229
| | | | | | | | | | | | | | "This patch is a first pass at adding support for exceptions for the GNU runtime. There are a few limitations at present: - @synchronized() is not yet supported at all. gcc currently emits calls to runtime library functions that don't exist for this directive. - Only id @catch statements are currently working. This is enough for NS_DURING and friends, but I need to spend more time reading the output from gcc -S to work out how it finds the class pointer to make arbitrary class type catch statements work. - I've tested it with a few common cases[1] and the clang test suite (which doesn't test exceptions for the GNU runtime, but shows I haven't broken anything else), but there are probably a lot of cases I've missed." Patch by David Chisnall! llvm-svn: 71198
* Patch to support Gnu runtime's typed selectors.Fariborz Jahanian2009-05-051-7/+38
| | | | | | Patch by David Chisnall. llvm-svn: 71023
* "The attached diff fixes the //FIXME in message send to super. This should ↵Chris Lattner2009-05-041-4/+4
| | | | | | | | now be faster, and works in the presence of class posing. This is now the same approach as used in GCC (the earlier code was a quick hack to get something working)." Patch by David Chisnall! llvm-svn: 70877
* Patch from David Chisnall:Daniel Dunbar2009-05-041-11/+47
| | | | | | | | | The attached diff fixes the //FIXME in message send to super. This should now be faster, and works in the presence of class posing. This is now the same approach as used in GCC (the earlier code was a quick hack to get something working). llvm-svn: 70868
* Compute Objective-C metadata size information from the record layout,Daniel Dunbar2009-05-031-7/+3
| | | | | | not the shadow structure. llvm-svn: 70691
* Coalesce the ivar offset calculation further.Daniel Dunbar2009-05-031-1/+2
| | | | llvm-svn: 70683
* split ObjC and C++ Statements out into their own headers.Chris Lattner2009-04-261-0/+1
| | | | llvm-svn: 70105
* "This fixes message sends to super in a way that both works with real code ↵Chris Lattner2009-04-251-20/+28
| | | | | | | | and passes the test in the test suite. It also fixes a crash when using recent versions of GNU libobjc and compiling modules that do not contain any constant strings but do contain a declaration of the constant string class and possible some other corner cases (thanks to Pete French for providing me with a test case for that one)." Patch by David Chisnall! llvm-svn: 70093
* Eliminate the three SmallVectors in ObjCImplDecl (for instanceDouglas Gregor2009-04-231-8/+16
| | | | | | | | | | | methods, class methods, and property implementations) and instead place all of these entities into the DeclContext. This eliminates more linear walks when looking for class or instance methods and should make PCH (de-)serialization of ObjCDecls trivial (and lazy). llvm-svn: 69849
* Add CGObjCRuntime::GetConcreteClassStruct to encapsulate access to theDaniel Dunbar2009-04-221-9/+2
| | | | | | underlying llvm::StructType for an interface. llvm-svn: 69796
* Use ComputeIvarBaseOffset instead of looking up by hand.Daniel Dunbar2009-04-221-7/+2
| | | | llvm-svn: 69789
* Merge ivar access amongst the three runtimes.Daniel Dunbar2009-04-221-21/+3
| | | | | | | | | - For now, this means we are always doing the address computations by hand instead of constructing a proper GEP. Right now, however, this is less important than having fewer entry points to dealing with Objective-C interface layout. llvm-svn: 69787
* Make ObjCInterfaceDecl's const in some more places.Daniel Dunbar2009-04-221-2/+2
| | | | llvm-svn: 69775
* Kill ASTContext::[gs]etFieldForDecl, instead we just lookup thingsDaniel Dunbar2009-04-211-3/+2
| | | | | | | | when we need them -- which is exactly what some code was already doing! - No intended functionality change. llvm-svn: 69648
* Remove LateBoundIVars() runtime interface, it is unused.Daniel Dunbar2009-04-211-3/+0
| | | | llvm-svn: 69641
* Assert on a few conditions that (I believe) should holdDaniel Dunbar2009-04-211-0/+1
| | | | | | | w.r.t. ASTContext::[gs]etFieldDecl, and the Field argument to EmitObjCValueForIvar). llvm-svn: 69639
* Remove non-const form of lookupFieldDeclForIvar.Daniel Dunbar2009-04-201-2/+4
| | | | llvm-svn: 69563
* Fix rdar://6804402 - crash on objc implementations declared withChris Lattner2009-04-191-2/+6
| | | | | | | @class but no implementation. This was broken in all 3 runtime impls. llvm-svn: 69512
* revert david's patch, which causes a testsuite failure.Chris Lattner2009-04-191-3/+2
| | | | llvm-svn: 69501
* "This patch fixes message sends to super in class methods for the GNU ↵Chris Lattner2009-04-181-2/+3
| | | | | | | | runtime (currently an instance method lookup is being performed)." Patch by David Chisnall! llvm-svn: 69493
* Propagate the ASTContext to various AST traversal and lookup functions.Douglas Gregor2009-04-091-4/+5
| | | | | | No functionality change (really). llvm-svn: 68726
* Fixes a problem where the compiler is reporting the wrong size to the Gnu Fariborz Jahanian2009-04-011-2/+3
| | | | | | | runtime on 64-bit architectures. Patch by David Chisnall llvm-svn: 68238
* tidy some code.Chris Lattner2009-04-011-10/+8
| | | | llvm-svn: 68174
* Patch to fix proptocol reference ir-gen for GNU runtime.Fariborz Jahanian2009-03-311-2/+39
| | | | | | Patch by David Chisnal. llvm-svn: 68125
OpenPOWER on IntegriCloud