summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC
Commit message (Collapse)AuthorAgeFilesLines
...
* In ObjC++ on legacy runtimes, push an EH cleanup as well asJohn McCall2013-04-031-2/+2
| | | | | | | | | | | | a normal cleanup when entering a @try or @synchronized to ensure that we clean that up if an exception is triggered. Apparently GCC did this, so it's hard to argue that we shouldn't do at least as much. rdar://12364847 llvm-svn: 178599
* generalize testcaseAdrian Prantl2013-03-291-1/+1
| | | | llvm-svn: 178383
* Bugfix/Followup for r177086.Adrian Prantl2013-03-294-20/+35
| | | | | | | | | * Store the .block_descriptor (instead of self) in the alloca so we can guarantee that all captured variables are available at -O0. * Add the missing OpDeref for the alloca. rdar://problem/12767564 llvm-svn: 178361
* Make clang to mark static stack allocations with lifetime markers to enable ↵Nadav Rotem2013-03-232-12/+13
| | | | | | | | | a more aggressive stack coloring. Patch by John McCall with help by Shuxin Yang. rdar://13115369 llvm-svn: 177819
* Under ARC, when we're passing the address of a strong variableJohn McCall2013-03-233-10/+16
| | | | | | | | | | | | to an out-parameter using the indirect-writeback conversion, and we copied the current value of the variable to the temporary, make sure that we register an intrinsic use of that value with the optimizer so that the value won't get released until we have a chance to retain it. rdar://13195034 llvm-svn: 177813
* Generalize debug info tests to be forward compatible with future ↵David Blaikie2013-03-212-2/+2
| | | | | | DISubprogram changes llvm-svn: 177659
* Simplify/generalize some debug info test casesDavid Blaikie2013-03-197-17/+17
| | | | | | | | | Mostly, try to depend on the annotation comments more so these tests are more legible, brief, and agnostic to schema changes in the future (sure, they're not agnostic to changes to the comment annotations but since they're easier to read they should be easier to update if that happens). llvm-svn: 177457
* Add a clarifying note when a return statement is rejected becauseJohn McCall2013-03-191-4/+12
| | | | | | | | we expect a related result type. rdar://12493140 llvm-svn: 177378
* Generalize a few debug info test casesDavid Blaikie2013-03-171-1/+1
| | | | | | | | Checking for the annotation comment rather than the metadata values makes these tests resilient to a coming refactor that will pull these fields out into a separate metadata node. llvm-svn: 177237
* Add a testcase for r177118.Adrian Prantl2013-03-141-1/+2
| | | | llvm-svn: 177124
* Allocate stack storage for .block_descriptor and captured self at -O0.Adrian Prantl2013-03-141-0/+64
| | | | | | | | | This way the register allocator will not optimize away the debug info for captured variables. Fixes rdar://problem/12767564 llvm-svn: 177086
* Tighten up the rules for precise lifetime and documentJohn McCall2013-03-132-72/+121
| | | | | | | | the requirements on the ARC optimizer. rdar://13407451 llvm-svn: 176924
* Improve the caching of debuginfo Objective C interface types.Adrian Prantl2013-03-111-0/+5
| | | | | | | | Generate forward declarations that are RAUW'd by finalize(). We thus avoid outputting the same type several times in multiple stages of completion. llvm-svn: 176820
* Ensure that DIType is regenerated after we visit an implementationAdrian Prantl2013-03-063-0/+96
| | | | | | | | | | that adds ivars to an interface. Fixes rdar://13175234 This is an update to r176116 that performs a smart caching of interfaces. llvm-svn: 176584
* Add more of the command line options as attribute flags.Bill Wendling2013-02-282-1/+4
| | | | | | These can be easily queried by the back-end. llvm-svn: 176304
* Use the actual ABI-determined C calling convention for runtimeJohn McCall2013-02-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | calls and declarations. LLVM has a default CC determined by the target triple. This is not always the actual default CC for the ABI we've been asked to target, and so we sometimes find ourselves annotating all user functions with an explicit calling convention. Since these calling conventions usually agree for the simple set of argument types passed to most runtime functions, using the LLVM-default CC in principle has no effect. However, the LLVM optimizer goes into histrionics if it sees this kind of formal CC mismatch, since it has no concept of CC compatibility. Therefore, if this module happens to define the "runtime" function, or got LTO'ed with such a definition, we can miscompile; so it's quite important to get this right. Defining runtime functions locally is quite common in embedded applications. llvm-svn: 176286
* Temporarily revert r176116 for compile-time performance regression.Adrian Prantl2013-02-273-95/+0
| | | | | | This reverts commit ea95e4587fd13606fbf63b10a07a7d02026aa39c. llvm-svn: 176151
* Reapply r176133 with testcase fixes.Bill Wendling2013-02-275-22/+13
| | | | llvm-svn: 176145
* Ensure that DIType is regenerated after we visited an implementation that ↵Adrian Prantl2013-02-263-0/+95
| | | | | | adds ivars to an interface. Fixes rdar://13175234 llvm-svn: 176116
* Revert "Add more attributes from the command line to functions."Anna Zaks2013-02-255-14/+20
| | | | | | | | This reverts commit 176009. The commit is a likely cause of several buildbot failures. llvm-svn: 176044
* Add more attributes from the command line to functions.Bill Wendling2013-02-255-20/+14
| | | | | | | This is an ongoing process. Any command line option which a back-end cares about should be added here. llvm-svn: 176009
* Update tests so that we don't test for function-only attributes on call sites.Bill Wendling2013-02-221-3/+3
| | | | llvm-svn: 175921
* Update to use references to attribute groups instead of listing the ↵Bill Wendling2013-02-2214-80/+104
| | | | | | attributes on the call/invoke instructions. llvm-svn: 175878
* Patch for debug info of qualified-id types is 'id'Fariborz Jahanian2013-02-211-0/+41
| | | | | | By Adrian Pranti. llvm-svn: 175793
* objective-C arc IR-gen. Retaining of strongFariborz Jahanian2013-02-216-13/+15
| | | | | | | | | | arguments in function prologue is done with objc_StoreStrong to pair it with similar objc_StoreStrong for release in function epilogue. This is done with -O0 only. // rdar://13145317 llvm-svn: 175698
* Modify the tests to use attribute group references instead of listing theBill Wendling2013-02-205-9/+27
| | | | | | function attributes. llvm-svn: 175606
* Use the actual class visibility for the ObjC EHTYPE global,John McCall2013-02-191-0/+27
| | | | | | | | not the global visibility mode. Noticed by inspection. llvm-svn: 175479
* CodeGenFunction::CurFuncDecl can be NULL; fix crash introduced in r175386.Douglas Gregor2013-02-181-1/+13
| | | | llvm-svn: 175448
* Update test cases to account for DIBuilder type changes.David Blaikie2013-02-182-2/+2
| | | | | | Paired commit with LLVM, may produce temporary build breakage. llvm-svn: 175427
* Test ivar-invariant.m: use a more idiomatic RUN line and tighten the testDmitri Gribenko2013-02-171-1/+4
| | | | | | by matching the function name first llvm-svn: 175395
* [clang] fix test execution commandSaleem Abdulrasool2013-02-171-1/+1
| | | | | Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> llvm-svn: 175387
* [CodeGen] tighten objc ivar invariant.load attributionSaleem Abdulrasool2013-02-171-0/+53
| | | | | | | | | | | | | | | | | An ivar ofset cannot be marked as invariant load in all cases. The ivar offset is a lazily initialised constant, which is dependent on an objc_msgSend invocation to perform a fixup of the offset. If the load is being performed on a method implemented by the class then this load can safely be marked as an inviarant because a message must have been passed to the class at some point, forcing the ivar offset to be resolved. An additional heuristic that can be used to identify an invariant load would be if the ivar offset base is a parameter to an objc method. However, without the parameters available at hand, this is currently not possible. Reviewed-by: John McCall <rjmccall@apple.com> Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> llvm-svn: 175386
* Add the 'target-cpu' and 'target-features' attributes to functions.Bill Wendling2013-02-153-7/+7
| | | | | | | The back-end will use these values to reconfigure code generation for different features. llvm-svn: 175308
* objective-C: Fixes a compiler crash when encodingFariborz Jahanian2013-02-151-0/+18
| | | | | | | an ivar of type pointer to a typedef'ed object. // rdar://13190095 llvm-svn: 175298
* Make this test determinstic for my last patch.Fariborz Jahanian2013-02-141-18/+18
| | | | | | // rdar://13192366 llvm-svn: 175217
* objective-C: Make order of ivars which are synthesizedFariborz Jahanian2013-02-131-0/+58
| | | | | | | | in the course of property synthesis deterministic (ordered by their type size), instead of having hashtable order (as it is currently). // rdar://13192366 llvm-svn: 175100
* Properly assemble PHIs after a null-checked invoke of objc_msgSend.John McCall2013-02-122-18/+68
| | | | | | rdar://12046763 llvm-svn: 174946
* In ARC, emit non-peepholed +1s within the full-expression insteadJohn McCall2013-02-121-0/+39
| | | | | | of immediately afterwards. llvm-svn: 174922
* Split a couple of tests out into their own file.John McCall2013-02-122-93/+95
| | | | llvm-svn: 174921
* Changed CGObjCMac.cpp to add the marker externally_initialized to ↵Michael Gottesman2013-02-054-8/+16
| | | | | | | | | | | | | SELECTOR_REFERENCES in both the fragile and non-fragile API. This is to ensure that GlobalOpt in LLVM does not attempt to look through a selector reference to a method var name at compile time. I also added a test/updated old tests that need to recognize the new keyword. rdar://12580965. llvm-svn: 174461
* On platforms which do not support ARC natively, do not mark ↵Michael Gottesman2013-02-021-3/+31
| | | | | | | | | objc_retain/objc_release as "nonlazybind". rdar://13108298. rdar://13129783. llvm-svn: 174253
* Generalize DebugInfo tests by avoiding explicit metadata numbersDavid Blaikie2013-02-025-10/+13
| | | | | | | | | | | | | | | This addresses several (not all) debug info tests that use explicit metadata numbers. Wherever the same number appeared more than once in a test I used a named match to ensure the same number appeared in all those cases (this may still be overly constraining test cases as they may not have actually cared about that relationship). For one-off numbers I just replaced them with an unnamed regex. This may underconstrain poorly written test cases that were interested in checking that certain metadata nodes were related but didn't actually match on all the related nodes numbers. llvm-svn: 174247
* Tests: remove disabled llvm-gcc invocationsDmitri Gribenko2013-01-287-7/+0
| | | | llvm-svn: 173703
* PR14566: Debug Info: avoid top level lexical blocks in functionsDavid Blaikie2013-01-261-2/+1
| | | | | | | | | | | | | | | One of the gotchas (see changes to CodeGenFunction) was due to the fix in r139416 (for PR10829). This only worked previously because the top level lexical block would set the location to the end of the function, the debug location would be updated (as per r139416), the location would be set to the end of the function again (but that would no-op, since it was the same as the previous location), then the return instruction would be emitted using the debug location. Once the top level lexical block was no longer emitted, the end-of-function location change was causing the debug loc to be updated, regressing that bug. llvm-svn: 173593
* objC block layout: Patch reorders block layout to Fariborz Jahanian2013-01-176-161/+116
| | | | | | produce more inline layout metadata. // rdar://12752901 llvm-svn: 172683
* Enable the new (more C++-like, less broken) EH model when targeting the GNUstepDavid Chisnall2013-01-111-0/+3
| | | | | | Objective-C runtime 1.7 or greater. llvm-svn: 172207
* In my last patch initialize the destination to null (with a simple store) ↵Fariborz Jahanian2013-01-051-0/+1
| | | | | | | | before doing a storeStrong to it. // rdar://12530881 llvm-svn: 171572
* Fix testing case for Release build (r171493)Manman Ren2013-01-051-2/+3
| | | | | | rdar://11562117 llvm-svn: 171564
* objective-C arc: in copy helper function for Fariborz Jahanian2013-01-041-0/+14
| | | | | | | | | __strong __block variables, perform objc_storeStrong on source and destination instead of direct move. This is done with -O0 and to improve some analysis. // rdar://12530881 llvm-svn: 171555
* Debug Info: fix the line location for cleanup code of a block functionManman Ren2013-01-041-0/+85
| | | | | | | | | | The line information was changed when emitting debug information for all the DeclRefExprs and we should change it back to get ready for PopClenupBlocks called from FinishFunction. rdar://11562117 llvm-svn: 171493
OpenPOWER on IntegriCloud