summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC
Commit message (Collapse)AuthorAgeFilesLines
...
* Whether an argument is required (in contrast with being anJohn McCall2012-02-171-4/+4
| | | | | | | | | | | | | | | | | | | | | optional argument passed through the variadic ellipsis) potentially affects how we need to lower it. Propagate this information down to the various getFunctionInfo(...) overloads on CodeGenTypes. Furthermore, rename those overloads to clarify their distinct purposes, and make sure we're calling the right one in the right place. This has a nice side-effect of making it easier to construct a function type, since the 'variadic' bit is no longer separable. This shouldn't really change anything for our existing platforms, with one minor exception --- we should now call variadic ObjC methods with the ... in the "right place" (see the test case), which I guess matters for anyone running GNUStep on MIPS. Mostly it's just a substantial clean-up. llvm-svn: 150788
* Fix this test to work with and without Asserts mode.Dan Gohman2012-02-161-13/+10
| | | | llvm-svn: 150713
* Fix test to not depend upon metadata numbers.Bill Wendling2012-02-161-1/+1
| | | | llvm-svn: 150668
* test/CodeGenObjC/arc-no-arc-exceptions.m: Disable it at -Asserts for now.NAKAMURA Takumi2012-02-161-0/+3
| | | | llvm-svn: 150666
* Fix test for r150648.Chad Rosier2012-02-161-7/+7
| | | | llvm-svn: 150650
* Use the new method for specifying garbage collection metadata in the module.Bill Wendling2012-02-163-5/+12
| | | | | | | | | | The garbage collection metadata needs to be merged "intelligently", when two or more modules are linked together, and not merely appended. (Appending creates a section which is too large.) The module flags metadata method is the way to do this. <rdar://problem/8198537> llvm-svn: 150648
* Teach clang to add metadata tags to calls and invokes in ObjC withDan Gohman2012-02-161-0/+78
| | | | | | | | | -fno-objc-arc-exceptions. This will allow the optimizer to perform optimizations which are only safe under that flag. This is a part of rdar://10803830. llvm-svn: 150644
* objc-arc: For arc's ivar layout, treat __unsafe_unretained ivarsFariborz Jahanian2012-02-161-0/+11
| | | | | | as unscanned. // rdar://10832643 llvm-svn: 150639
* Emit debug info for properites that are not backed by an ivar.Devang Patel2012-02-071-0/+32
| | | | llvm-svn: 149995
* Relax valid location check. This fixes a clang crash while emitting debug ↵Devang Patel2012-02-061-0/+17
| | | | | | info for properties that are synthesized by the compiler by default. llvm-svn: 149929
* Let an ivar directly refer property TAG.Devang Patel2012-02-061-0/+4
| | | | llvm-svn: 149881
* Unbreak failing test added in r149738.Richard Smith2012-02-041-1/+1
| | | | llvm-svn: 149766
* New test case.Devang Patel2012-02-041-0/+12
| | | | llvm-svn: 149738
* Update tests so that they don't rely upon LLVMDebugVersion number.Devang Patel2012-02-034-4/+4
| | | | llvm-svn: 149726
* fix test.Fariborz Jahanian2012-01-311-2/+2
| | | | llvm-svn: 149313
* test for a v-table dispatch that consumes anFariborz Jahanian2012-01-301-0/+32
| | | | | | | argument. twik to support the test case. // rdar://10444476 llvm-svn: 149298
* objc-arc: Perform null check on receiver before sending methods whichFariborz Jahanian2012-01-301-2/+7
| | | | | | | | | consume one or more of their arguments. If not done, this will cause a leak as method will not consume the argument when receiver is null. In this patch, the null path releases consumed argument. // rdar://10444474 llvm-svn: 149279
* revert r149184Fariborz Jahanian2012-01-291-6/+2
| | | | llvm-svn: 149205
* When emitting an ARC epilogue that looks like a return of 'self',John McCall2012-01-291-0/+11
| | | | | | | | kill the retain from the return site. This has the workaround nature. It's badness all around. llvm-svn: 149193
* Get a little bit smarter about killing off the ReturnValue allocaJohn McCall2012-01-291-30/+15
| | | | | | | in the presence of straight-line cleanups. This is a simple but important case, particularly for ARC. llvm-svn: 149190
* objc-arc: Perform null check on receiver before sending methods whichFariborz Jahanian2012-01-281-2/+6
| | | | | | | | consume one or more of their arguments. If not done, this will cause a leak as method will not consume the argument when receiver is null. // rdar://10444474 llvm-svn: 149184
* When initializing a catch variable in ARC, be sure to emit retainsJohn McCall2012-01-171-0/+45
| | | | | | | | | or whatever else is required for the initialization instead of assuming it can be done with a simple store. Fixes PR11732. llvm-svn: 148325
* Restore r147493 and remove the part of the test that was checking the wrong ↵David Chisnall2012-01-041-2/+0
| | | | | | thing. llvm-svn: 147530
* When performing layout for an Objective-C class, make sure to dig outDouglas Gregor2011-12-201-0/+6
| | | | | | the definition of that class. Fixes PR11613 / <rdar://problem/10604077>. llvm-svn: 146976
* Update tests to match r146744.Devang Patel2011-12-162-2/+2
| | | | llvm-svn: 146745
* Update tests to match r146665.Devang Patel2011-12-152-2/+2
| | | | llvm-svn: 146668
* Fix an extremely stupid bug causing terrible miscompilationsJohn McCall2011-12-061-0/+43
| | | | | | of &= on pseudo-objects. llvm-svn: 145904
* Make sure that forward declarations are marked as such in the debug infoEric Christopher2011-11-291-0/+5
| | | | | | | | for the structure type. rdar://10499337 llvm-svn: 145461
* The optimizers figured out how to make this store 6.Nick Lewycky2011-11-151-5/+1
| | | | llvm-svn: 144597
* In ARC, don't reclaim objects of Class type.John McCall2011-11-141-0/+24
| | | | llvm-svn: 144561
* Add invariant.load metadata to loads from selector references. Allows these ↵Pete Cooper2011-11-101-0/+9
| | | | | | loads to later be moved/combined in the optimizer. Fixes <rdar://problem/6027699> llvm-svn: 144318
* Whenever explicitly activating or deactivating a cleanup, weJohn McCall2011-11-101-1/+1
| | | | | | | | | | need to provide a 'dominating IP' which is guaranteed to dominate the (de)activation point but which cannot be avoided along any execution path from the (de)activation point to the push-point of the cleanup. Using the entry block is bad mojo. llvm-svn: 144276
* Fix a subtle bug with cleanups: when activatingJohn McCall2011-11-102-13/+57
| | | | | | | | | | | | a previously-inactive cleanup, not only do we need a flag variable, but we should also force the cleanup to query the flag variable. However, we only need to do this when we're activating in a context that's conditionally executed; otherwise, we may safely assume that the cleanup is dominated by the activation point. llvm-svn: 144271
* Enter the cleanups for a block outside the enclosingJohn McCall2011-11-102-7/+20
| | | | | | | | | | | | full-expression. Naturally they're inactive before we enter the block literal expression. This restores the intended behavior that blocks belong to their enclosing scope. There's a useful -O0 / compile-time optimization that we're missing here with activating cleanups following straight-line code from their inactive beginnings. llvm-svn: 144268
* Emit the copy and dipose helpers for ARC __strongJohn McCall2011-11-091-1/+28
| | | | | | | | | | | | | | | | | | | | block-typed __block variables using objc_retainBlock and objc_dispose. Previously we were using _Block_object_assign and _Block_object_destroy with BLOCK_BYREF_CALLER, which causes the runtime to completely ignore the retain and release. In most cases this doesn't cause catastrophe because the retain/release are balanced and because the block in the variable was copied upon assignment there. However, the stack copy of the variable will be released when it goes out of scope, which is a problem if that value was released due to an assignment to the heap copy. Similarly, a leak can occur if the variable is assigned after the copy to the heap. llvm-svn: 144162
* Extract the blocks-related ARC tests into their own file.John McCall2011-11-092-428/+430
| | | | llvm-svn: 144158
* Bind function "r-values" as l-values when emitting them asJohn McCall2011-11-081-0/+11
| | | | | | opaque values. Silly C type system. llvm-svn: 144144
* In x86_64, when calling an Objective-C method that returns a _Complex long ↵Anders Carlsson2011-10-311-0/+28
| | | | | | double, make sure to use the objc_msgSend_fp2ret function which ensures that the return value will be {0, 0} if the receiver is nil. llvm-svn: 143350
* Fix test for LLVM change r143186.Nick Lewycky2011-10-281-3/+2
| | | | llvm-svn: 143187
* objc: fix an ir-gen crash caused by recent Fariborz Jahanian2011-10-271-0/+48
| | | | | | property refactoring. // rdar://10327068 llvm-svn: 143139
* Move these test from checking assembly to checking LLVM IR. Should fix falloutNick Lewycky2011-10-273-15/+6
| | | | | | from r143097. llvm-svn: 143098
* Objective-c: fix an ir-gen crash where objc messag returns a _ComplexFariborz Jahanian2011-10-261-0/+16
| | | | | | | value and ABI requires return slot to be passed as first argument to message sent. // rdar://10331109 llvm-svn: 143053
* Add block information for ObjC @catch blocks.Eric Christopher2011-10-191-0/+16
| | | | | | Fixes rdar://10282889 llvm-svn: 142467
* Strip qualifiers off the type of an implicit property defined byJohn McCall2011-10-171-0/+15
| | | | | | only a setter. llvm-svn: 142236
* When constructing debug information for synthesized variables for theEric Christopher2011-10-061-0/+15
| | | | | | | | | | non-fragile ABI we may not be able to lay out the type and the debugger would ignore us even if we did put in the offset. Go ahead and just put any value there and don't look up the offset since it may not exist. rdar://10210157 llvm-svn: 141261
* Mark calls to objc_retainBlock that don't result from castsJohn McCall2011-10-041-0/+22
| | | | | | to id so that we can still optimize them appropriately. llvm-svn: 141064
* Make -fobjc-nonfragile-abi the -cc1 default, since it's theJohn McCall2011-10-02133-194/+194
| | | | | | | | | | | | | | | | | | | increasingly prevailing case to the point that new features like ARC don't even support the fragile ABI anymore. This required a little bit of reshuffling with exceptions because a check was assuming that ObjCNonFragileABI was only being set in ObjC mode, and that's actually a bit obnoxious to do. Most, though, it involved a perl script to translate a ton of test cases. Mostly no functionality change for driver users, although there are corner cases with disabling language-specific exceptions that we should handle more correctly now. llvm-svn: 140957
* When performing an @throw in ARC, retain + autoreleaseJohn McCall2011-10-011-10/+12
| | | | | | | the pointer, being sure to do so before running cleanups associated with that full-expression. rdar://10042689 llvm-svn: 140945
* Parse attributes written in an ObjC method parameter type asJohn McCall2011-10-011-0/+24
| | | | | | attributes on the parameter declaration. llvm-svn: 140944
* Allow the results of cf_returns_not_retained functionJohn McCall2011-10-011-2/+0
| | | | | | | | | | calls, or calls to audited functions without an explicit return attribute, to be casted without a bridge cast. Tie this mechanism in with the existing exceptions to the cast restrictions. State those restrictions more correctly and generalize. llvm-svn: 140912
OpenPOWER on IntegriCloud