summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCRuntime.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Adopt objc_assign_threadlocal() for __thread variables of GC types.Fariborz Jahanian2010-07-201-1/+2
| | | | | | Implements radar 8203301. llvm-svn: 108917
* Validated by nightly-test runs on x86 and x86-64 darwin, including afterJohn McCall2010-07-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | self-host. Hopefully these results hold up on different platforms. I tried to keep the GNU ObjC runtime happy, but it's hard for me to test. Reimplement how clang generates IR for exceptions. Instead of creating new invoke destinations which sequentially chain to the previous destination, push a more semantic representation of *why* we need the cleanup/catch/filter behavior, then collect that information into a single landing pad upon request. Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional control flow) are generated, since it's actually fairly closely tied in with the former. Remove the need to track which cleanup scope a block is associated with. Document a lot of previously poorly-understood (by me, at least) behavior. The new framework implements the Horrible Hack (tm), which requires every landing pad to have a catch-all so that inlining will work. Clang no longer requires the Horrible Hack just to make exceptions flow correctly within a function, however. The HH is an unfortunate requirement of LLVM's EH IR. llvm-svn: 107631
* Objective-c++ IRGen. Support for @selector expression asFariborz Jahanian2010-06-171-1/+1
| | | | | | an lvalue. Fixes PR7390. llvm-svn: 106235
* Patch adds support for copying of thoseFariborz Jahanian2010-06-151-1/+1
| | | | | | | | objective-c++ class objects which have GC'able objc object pointers and need to use ObjC's objc_memmove_collectable API (radar 8070772). llvm-svn: 106061
* Push a return-value slot throughout ObjC message-send codegen. Will beJohn McCall2010-05-221-0/+2
| | | | | | | critical for ObjC++ correctness; hard to test independently of various required Sema changes, though. llvm-svn: 104422
* Changed signature of GenerateMessageSend() function to pass the ↵David Chisnall2010-04-281-1/+1
| | | | | | | | ObjCInterfaceDecl for class messages and removed the boolean IsClassMessage argument, which wasn't used anywhere. Emitted some metadata on message sends to allow a later pass to do some speculative inlining of class methods (GNU runtime). Speculative inlining of instance methods requires type feedback to be useful (work in progress), but for class methods it works quite nicely. llvm-svn: 102514
* Add some API code for future work.Fariborz Jahanian2010-04-121-0/+3
| | | | llvm-svn: 101052
* IRgen: Move BitField LValues to just hold a reference to the CGBitFieldInfo.Daniel Dunbar2010-04-051-2/+1
| | | | | | | | | - Unfortunately, this requires some horrible code in CGObjCMac which always allocats a CGBitFieldInfo because we don't currently build a proper layout for Objective-C classes. It needs to be cleaned up, but I don't want the bit-field cleanups to be blocked on that. llvm-svn: 100474
* Minor include pruning.Benjamin Kramer2010-03-311-1/+0
| | | | llvm-svn: 100007
* Revert "Numerous changes to selector handling:", this breaks a whole bunch ofDaniel Dunbar2010-02-031-6/+0
| | | | | | working code, for no apparent reason. llvm-svn: 95244
* Numerous changes to selector handling:David Chisnall2010-02-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | - Don't use GlobalAliases with non-0 GEPs (GNU runtime) - this was unsupported and LLVM will be generating errors if you do it soon. This also simplifies the code generated by the GNU runtime a bit. - Make GetSelector() return a constant (GNU runtime), not a load of a store of a constant. - Recognise @selector() expressions as valid static initialisers (as GCC does). - Add methods to GCObjCRuntime to emit selectors as constants (needed for using @selector() expressions as constants. These need implementing for the Mac runtimes - I couldn't figure out how to do this, they seem to require a load. - Store an ObjCMethodDecl in an ObjCSelectorExpr so that we can get at the type information for the selector. This is needed for generating typed selectors from @selector() expressions (as GCC does). Ideally, this information should be stored in the Selector, but that would be an invasive change. We should eventually add checks for common uses of @selector() expressions. Possibly adding an attribute that can be applied to method args providing the types of a selector so, for example, you'd do something like this: - (id)performSelector: __attribute__((selector_types(id, SEL, id)))(SEL) withObject: (id)object; Then, any @selector() expressions passed to the method will be check to ensure that it conforms to this signature. We do this at run time on the GNU runtime already, but it would be nice to do it at compile time on all runtimes. - Made @selector() expressions emit type info if available and the runtime supports it. Someone more familiar with the Mac runtime needs to implement the GetConstantSelector() function in CGObjCMac. This currently just assert()s. llvm-svn: 95189
* Created __builtin___NSStringMakeConstantString() builtin, which generates ↵David Chisnall2010-01-231-1/+1
| | | | | | constant Objective-C strings. llvm-svn: 94274
* Patch fixes a code gen. bug in generation of objc_assign_ivarFariborz Jahanian2009-09-241-1/+2
| | | | | | (objc GC's API). llvm-svn: 82724
* IRgen/ObjC: Make the target method decl available to GenerateMessageSendSuper.Daniel Dunbar2009-09-171-2/+9
| | | | llvm-svn: 82117
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-15/+15
| | | | llvm-svn: 81346
* Re-implemented generation of objc_memmove_collectableFariborz Jahanian2009-08-311-1/+1
| | | | | | API for copying GC'able aggregates (Next runtime only). llvm-svn: 80607
* fix objc codegen to not have its own list of things that eventually get into ↵Chris Lattner2009-07-171-3/+0
| | | | | | | | llvm.used, just populate CGM's list directly. llvm-svn: 76266
* Implemented memmove_collectable API for Next runtimeFariborz Jahanian2009-07-081-0/+4
| | | | | | | when struct variables with GC'able members are copied into. Will provide a test case later. llvm-svn: 74984
* Patch fixes an obscure bug when 'used' attribute is applied toFariborz Jahanian2009-06-231-0/+3
| | | | | | | | | 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
* Reflow some comments.Mike Stump2009-05-161-6/+5
| | | | llvm-svn: 71937
* Patch to support Gnu runtime's typed selectors.Fariborz Jahanian2009-05-051-2/+8
| | | | | | Patch by David Chisnall. llvm-svn: 71023
* Add a ComputeIvarBaseOffset overload taking an implementationDaniel Dunbar2009-05-031-0/+6
| | | | | | | | decl. Only this routine will be suitable for computing the offset of a synthesized ivar. - No functionality change. llvm-svn: 70696
* Compute Objective-C metadata size information from the record layout,Daniel Dunbar2009-05-031-6/+0
| | | | | | not the shadow structure. llvm-svn: 70691
* Coalesce the ivar offset calculation further.Daniel Dunbar2009-05-031-1/+3
| | | | llvm-svn: 70683
* Add CGObjCRuntime::GetConcreteClassStruct to encapsulate access to theDaniel Dunbar2009-04-221-3/+9
| | | | | | underlying llvm::StructType for an interface. llvm-svn: 69796
* Merge ivar access amongst the three runtimes.Daniel Dunbar2009-04-221-2/+22
| | | | | | | | | - 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-1/+1
| | | | llvm-svn: 69775
* Kill ASTContext::[gs]etFieldForDecl, instead we just lookup thingsDaniel Dunbar2009-04-211-1/+0
| | | | | | | | 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-9/+3
| | | | llvm-svn: 69641
* Some "prep" work for handling ObjC @-string constants that contain UTF-8. No ↵Steve Naroff2009-03-311-1/+2
| | | | | | | | functionality change. Changed GenerateConstantString() to take an ObjCStringLiteral (instead of a std::string). While this isn't strictly necessary, it seems cleaner and allows us to cache to "containsNonAscii" if necessary (to avoid checking in both Sema and CodeGen). llvm-svn: 68114
* pull "runtime globals" into the same framework as other functions/global ↵Chris Lattner2009-03-221-3/+3
| | | | | | | | variables. No intended functionality change. llvm-svn: 67478
* Obscure code gen bug related to sending Fariborz Jahanian2009-02-281-0/+1
| | | | | | | message to 'super' in a class method declared in cateogy (darwin specific). llvm-svn: 65709
* Some refactoring of Ivar offset code gen.Fariborz Jahanian2009-02-101-0/+3
| | | | | | in preparation for nonfragile ivar offset work. llvm-svn: 64225
* ir-gen for nonfragile ivar bitfield access (objc2 nonfragile abi).Fariborz Jahanian2009-02-031-6/+6
| | | | llvm-svn: 63644
* objc2's ir-gen for nonfragile ivar access.Fariborz Jahanian2009-02-031-0/+1
| | | | llvm-svn: 63578
* Refactored code gen for ivar access in preparation forFariborz Jahanian2009-02-021-0/+7
| | | | | | objc2 nonfragile ivar access code gen. llvm-svn: 63541
* Use NonFragileABI as name of new Next abi. More comments Fariborz Jahanian2009-01-221-1/+1
| | | | | | for the new meta-data. llvm-svn: 62806
* Refactoring ObjC Next's runtime classes in preparation forFariborz Jahanian2009-01-211-0/+1
| | | | | | the new ObjC's abi. llvm-svn: 62721
* This patch fixes the code gen failures which was a fallout fromFariborz Jahanian2009-01-101-1/+3
| | | | | | | | not merging protocol properties into the classes which use those protocols. With this patch, all my exceutable test pass again. llvm-svn: 62030
* Remove tabs.Nate Begeman2008-12-161-1/+1
| | | | llvm-svn: 61097
* Consolidated @try and @synchronize into a singleFariborz Jahanian2008-11-211-4/+2
| | | | | | code gen. method. llvm-svn: 59767
* Introducing objc_assign_ivar to clang.Fariborz Jahanian2008-11-201-0/+2
| | | | llvm-svn: 59740
* Generate strong write barriers for __strong objects.Fariborz Jahanian2008-11-191-0/+4
| | | | | | Also, took care of Daniel's commments. llvm-svn: 59575
* Patch for generation of weak write barriers for objcFariborz Jahanian2008-11-181-1/+3
| | | | | | __weak objects. llvm-svn: 59560
* Generate objc_read_weak for __weak objc loads.Fariborz Jahanian2008-11-181-0/+2
| | | | llvm-svn: 59553
* Start implementing support for @synchonized with the darwin ObjC API.Chris Lattner2008-11-151-0/+3
| | | | | | Patch by Fariborz! llvm-svn: 59377
* Move IRBuilder type definition to common file.Daniel Dunbar2008-11-011-6/+5
| | | | | | - No functionality change. llvm-svn: 58546
* Add Obj-C runtime methods to get runtime specific functions forDaniel Dunbar2008-09-241-0/+6
| | | | | | implementing property access. llvm-svn: 56542
* Move handling of @try and @throw to the runtime class.Anders Carlsson2008-09-091-0/+7
| | | | llvm-svn: 55983
* Change CodeGen to emit calls using (RValue,Type) list:Daniel Dunbar2008-09-091-5/+4
| | | | | | | | | | | | | | - Add CodeGenFunction::EmitAnyExprToTemp o Like EmitAnyExpr, but emits aggregates to a temporary location if none is available. Seems like this should be simpler (even aside from using first class aggregates). - Killed CodeGenFunction::EmitCallArg (just append the pair) - Conversion of RValues to actual call arguments is now isolated in CodeGenFunction::EmitCall. llvm-svn: 55970
OpenPOWER on IntegriCloud