summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* LastFieldBitfield in CGObjCCommonMac::BuildAggrIvarLayout keeps bitfields or ↵Argyrios Kyrtzidis2010-09-061-15/+24
| | | | | | | | unnamed fields but later the code assumes that it's always a bitfield. This can lead to a crash (reported at rdar://8368320). llvm-svn: 113154
* IRgen/Obj-C: Rewrite Objective-C bit-field access to compute the access strategyDaniel Dunbar2010-09-021-21/+24
| | | | | | | | using the same methods as used for normal structures. - This fixes problems with reading past the end of the structure and with handling straddled bit-field access. llvm-svn: 112914
* Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ↵Ted Kremenek2010-09-011-6/+7
| | | | | | | | | | | | | ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols (and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is needed to maintain the lexical information of the original source. Fixes <rdar://problem/8380046>. llvm-svn: 112691
* Simplify.Daniel Dunbar2010-08-211-3/+2
| | | | llvm-svn: 111724
* IRgen: Move remaining MakeAddr() calls to MakeAddrLValue().Daniel Dunbar2010-08-211-5/+7
| | | | llvm-svn: 111721
* objective-c ivar refactoring patch. IterationsFariborz Jahanian2010-08-201-5/+3
| | | | | | | | over ivars for a varienty of puposes is now consolidated into two small routines; DeepCollectObjCIvars and ShallowCollectObjCIvars. llvm-svn: 111679
* zap dead code.Chris Lattner2010-08-181-50/+14
| | | | llvm-svn: 111365
* StringRef'ication of lots stuff, patch by Peter Davies!Daniel Dunbar2010-08-171-2/+2
| | | | llvm-svn: 111314
* Remove dead code, caught by unused function warnings.Argyrios Kyrtzidis2010-08-151-36/+0
| | | | llvm-svn: 111091
* Fix a bug in @finally emission in both the fragile and non-fragile EH schemesJohn McCall2010-08-111-5/+16
| | | | | | | | | where we weren't accounting for the possibility that a @finally block might have internal cleanups and therefore might write to the cleanup destination slot. Fixes <rdar://problem/8293901>. llvm-svn: 110760
* Support ObjC implementation decls for PCH.Argyrios Kyrtzidis2010-08-091-4/+20
| | | | | | Strictly speaking, implementations don't go in headers but there's no law against it. llvm-svn: 110567
* Finishing up block variable layout API by supporting Fariborz Jahanian2010-08-061-8/+10
| | | | | | | union type variables and their nesting inside other aggregate types. llvm-svn: 110448
* Add support for block imported struct variable layout info.Fariborz Jahanian2010-08-051-2/+10
| | | | | | (objc gc and blocks in NeXt runtime). llvm-svn: 110377
* For now skip over aggregate non-byref block variables.Fariborz Jahanian2010-08-051-1/+4
| | | | | | (objc gc specific). llvm-svn: 110340
* Trying to unbreak buildbot.Fariborz Jahanian2010-08-051-1/+2
| | | | llvm-svn: 110339
* Clean up of my last patch.Fariborz Jahanian2010-08-051-13/+16
| | | | llvm-svn: 110290
* Block variable layout bitmap API generation.Fariborz Jahanian2010-08-041-80/+136
| | | | llvm-svn: 110287
* More objc block variable layout info. work.Fariborz Jahanian2010-08-041-2/+6
| | | | llvm-svn: 110239
* Some early work for providing block layout info. Fariborz Jahanian2010-08-041-0/+8
| | | | | | for objective-c/c++ blocks (NeXt runtime). llvm-svn: 110213
* Some more correctness fixes and code-size optimizations for fragile-ABIJohn McCall2010-08-041-80/+93
| | | | | | | | | | | ObjC exceptions: - don't enter a try for the catch blocks unless there's a finally - put the setjmp buffer in the locals set for liveness reasons - dump the sync object into an alloca in the locals set for liveness reasons Some of this can go away if the backend starts to properly calculate liveness in the presence of setjmp (which would also be a *much* stabler solution). llvm-svn: 110188
* Fix fragile-ABI ObjC exceptions in the presence of optimization withJohn McCall2010-07-311-3/+165
| | | | | | | | | the magic of inline assembly. Essentially we use read and write hazards on the set of local variables to force flushing locals to memory immediately before any protected calls and to inhibit optimizing locals across the setjmp->catch edge. Fixes rdar://problem/8160285 llvm-svn: 109960
* Revert "Re-apply fixed version of 108749, correctly conditionalizing the newDaniel Dunbar2010-07-291-15/+5
| | | | | | | sections on", this change uncovered a possible linker bug which resulted in the wrong messages getting dispatched. Backing this out while we investigate... llvm-svn: 109817
* Support catching Objective C pointers in C++ under the non-fragile NeXT runtime.John McCall2010-07-241-23/+37
| | | | | | Diagnose attempts to do this under the GNU or fragile NeXT runtimes. llvm-svn: 109298
* Revise cleanup IR generation to fix a major bug with cleanups (PR7686)John McCall2010-07-231-5/+5
| | | | | | | as well as some significant asymptotic inefficiencies with threading multiple jumps through deep cleanups. llvm-svn: 109274
* Rename LazyCleanup -> Cleanup. No functionality change for these last threeJohn McCall2010-07-211-14/+14
| | | | | | commits. llvm-svn: 109000
* Switch the fragile-ABI @finally/@synchronized cleanup over to using a lazyJohn McCall2010-07-211-32/+53
| | | | | | cleanup. llvm-svn: 108997
* Convert the ObjC @synchronized cleanups to laziness. This is not actuallyJohn McCall2010-07-211-6/+16
| | | | | | | a big deal, except that I want to eliminate the shared-code EH cleanups in preparation for a significant algorithmic fix. llvm-svn: 108973
* Adopt objc_assign_threadlocal() for __thread variables of GC types.Fariborz Jahanian2010-07-201-9/+31
| | | | | | Implements radar 8203301. llvm-svn: 108917
* Re-apply fixed version of 108749, correctly conditionalizing the new sections onJim Grosbach2010-07-201-5/+15
| | | | | | ObjC ABI version 2 this time. llvm-svn: 108847
* Temporarily revert. Some odd internal breakage is likely related.Jim Grosbach2010-07-191-4/+4
| | | | llvm-svn: 108764
* Put ObjC method names, method types and class names in separate string literalJim Grosbach2010-07-191-4/+4
| | | | | | sections. rdar://8207705 llvm-svn: 108749
* CodeGen/ObjC/NeXT: Fix Obj-C message send to match llvm-gcc when choosingDaniel Dunbar2010-07-141-26/+9
| | | | | | | | whether to use objc_msgSend_fpret; the choice is target dependent, not Obj-C ABI dependent. - <rdar://problem/8139758> arm objc _objc_msgSend_fpret bug llvm-svn: 108379
* Allow for the possibility that __cxa_end_catch might throw for a catch-all blockJohn McCall2010-07-131-7/+21
| | | | | | | or a catch of a record type by value or reference. Also convert this to a lazy cleanup. llvm-svn: 108287
* Teach IR generation how to lazily emit cleanups. This has a lot of advantages,John McCall2010-07-131-6/+3
| | | | | | | | | | | | | | | mostly in avoiding unnecessary work at compile time but also in producing more sensible block orderings. Move the destructor cleanups for local variables over to use lazy cleanups. Eventually all cleanups will do this; for now we have some awkward code duplication. Tell IR generation just to never produce landing pads in -fno-exceptions. This is a much more comprehensive solution to a problem which previously was half-solved by checks in most cleanup-generation spots. llvm-svn: 108270
* Validated by nightly-test runs on x86 and x86-64 darwin, including afterJohn McCall2010-07-061-334/+342
| | | | | | | | | | | | | | | | | | | | | | | | 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
* finally get around to doing a significant cleanup to irgen:Chris Lattner2010-06-271-10/+12
| | | | | | | | have CGF create and make accessible standard int32,int64 and intptr types. This fixes a ton of 80 column violations introduced by LLVMContextification and cleans up stuff a lot. llvm-svn: 106977
* Type Type::isRealFloatingType() that vectors are not floating-pointDouglas Gregor2010-06-221-2/+2
| | | | | | | | | types, updating callers of both isFloatingType() and isRealFloatingType() accordingly. Caught at least one issue where we allowed one to declare a vector of vectors (!), along with cleaning up the standard-conversion logic for C++. llvm-svn: 106595
* Fixes a problem in generation of meta-data forFariborz Jahanian2010-06-221-2/+10
| | | | | | | category implementation whereby property list was missing. NeXt ObjC runtime (radar 8093297). llvm-svn: 106550
* In fragile-abi (32bit mode abi) generate global symbolFariborz Jahanian2010-06-211-1/+11
| | | | | | | objc_category_name_xxx for each category implementation. (fixes PR7431) patch by Nico Weber. llvm-svn: 106492
* Fix an Obj-C++ miscompile when calling an Obj-C method that returns a C++ ↵Anders Carlsson2010-06-211-0/+5
| | | | | | reference. llvm-svn: 106477
* Objective-c++ IRGen. Support for @selector expression asFariborz Jahanian2010-06-171-9/+19
| | | | | | an lvalue. Fixes PR7390. llvm-svn: 106235
* Move CodeGenOptions.h *back* into Frontend. This should have been done when theChandler Carruth2010-06-151-1/+1
| | | | | | dependency edge was reversed such that CodeGen depends on Frontend. llvm-svn: 106065
* Patch adds support for copying of thoseFariborz Jahanian2010-06-151-14/+6
| | | | | | | | 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
* zero-cost exception API for NeXt runtime.Fariborz Jahanian2010-05-281-2/+14
| | | | | | | | rethrow inside @catch block must use objc_exception_rethrow API. Fixes radar 8037512. Test will be added to LLVM test suite. llvm-svn: 104964
* Push a return-value slot throughout ObjC message-send codegen. Will beJohn McCall2010-05-221-8/+23
| | | | | | | critical for ObjC++ correctness; hard to test independently of various required Sema changes, though. llvm-svn: 104422
* Clean up some more uses of getAs<ObjCInterfaceType>() that Fariborz pointedJohn McCall2010-05-171-10/+10
| | | | | | out. The remaining ones are okay. llvm-svn: 103973
* Substantially alter the design of the Objective C type AST by introducingJohn McCall2010-05-151-1/+2
| | | | | | | | | | | | | | | | | | | | | ObjCObjectType, which is basically just a pair of one of {primitive-id, primitive-Class, user-defined @class} with a list of protocols. An ObjCObjectPointerType is therefore just a pointer which always points to one of these types (possibly sugared). ObjCInterfaceType is now just a kind of ObjCObjectType which happens to not carry any protocols. Alter a rather large number of use sites to use ObjCObjectType instead of ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather than hashing them in a FoldingSet. Remove some number of methods that are no longer used, at least after this patch. By simplifying ObjCObjectPointerType, we are now able to easily remove and apply pointers to Objective-C types, which is crucial for a certain kind of ObjC++ metaprogramming common in WebKit. llvm-svn: 103870
* Merged Elaborated and QualifiedName types.Abramo Bagnara2010-05-111-2/+2
| | | | llvm-svn: 103517
* IRgen/NeXT: Put the synthesized _objc_super, _message_ref_t decls in a valid ↵Daniel Dunbar2010-04-291-2/+4
| | | | | | DeclContext, to satisfy the invariants that should hold on a RecordDecl. llvm-svn: 102624
* IRGen for initialization/destruction ofFariborz Jahanian2010-04-281-0/+6
| | | | | | | ivar class objects (NeXt runtime). (radar 7900343). llvm-svn: 102533
OpenPOWER on IntegriCloud