summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add support for GNU runtime property set / get structure functions. Minor ↵David Chisnall2010-12-261-3/+10
| | | | | | refactoring of Mac runtime (returns the same function for both, as the Mac runtimes currently only provide a single entry point for setting and getting struct properties, although this will presumably be fixed at some point). llvm-svn: 122569
* Some fixes for synthesized ivar metadata (GNU runtime).David Chisnall2010-11-031-0/+1
| | | | llvm-svn: 118172
* Substantially revise how clang computes the visibility of a declaration toJohn McCall2010-10-221-5/+5
| | | | | | | | more closely parallel the computation of linkage. This gets us to a state much closer to what gcc emits, modulo bugs, which will undoubtedly arise in abundance. llvm-svn: 117147
* This patch implements Next's IRGen for -fconstant-string-class=class-name.Fariborz Jahanian2010-10-191-1/+1
| | | | | | PR6056, //rdar: //8564463 llvm-svn: 116819
* Coding by inspection has its problems.John McCall2010-10-161-0/+2
| | | | llvm-svn: 116672
* objc_exception_rethrow does not take an exception argument.John McCall2010-10-161-23/+9
| | | | | | rdar://problem/8535238 llvm-svn: 116663
* Revert r116656, "IRgen/Obj-C/NeXT: Fix the IR signature forDaniel Dunbar2010-10-161-1/+1
| | | | | | | | objc_exception_rethrow, so we don't...", since something is actually trying to call this with the wrong signature (!). Unfortunately I don't understand the new EH infrastructure well enough to fix it immediately. llvm-svn: 116660
* IRgen/Obj-C/NeXT: Fix the IR signature for objc_exception_rethrow, so we don'tDaniel Dunbar2010-10-161-1/+1
| | | | | | generate unnecessary %al clear on x86_64. llvm-svn: 116656
* Death to blocks, or at least the word "block" in one particular obnoxiouslyJohn McCall2010-10-151-3/+3
| | | | | | ambiguous context. llvm-svn: 116567
* In the fragile ObjC ABI, save the caught exception to the side if there areJohn McCall2010-10-041-6/+33
| | | | | | | both @catches and a @finally, because the second call to @objc_exception_try_enter will clobber the exception slot. Fixes rdar://problem/8440970. llvm-svn: 115575
* Block description for trivial block literals haveFariborz Jahanian2010-09-131-2/+1
| | | | | | their 'isa' field scanned regardless. llvm-svn: 113749
* Fixes an obscure bug in importd block variable layoutFariborz Jahanian2010-09-111-5/+8
| | | | | | | | information when imported variable is used more than once. Originally though to be a bug in importing block varibles. Fixes radar 8417746. llvm-svn: 113675
* Block ivar layout must assume that the 'isa'Fariborz Jahanian2010-09-091-0/+3
| | | | | | | | field of the block descriptor is GC'able (scanned) as this what the runtime expects (one can send it messages). Radar 8394947. llvm-svn: 113454
* 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
OpenPOWER on IntegriCloud