summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC
Commit message (Collapse)AuthorAgeFilesLines
...
* Change this to an IR test instead of an assembly test (as per comment in ↵David Blaikie2012-12-281-8/+2
| | | | | | | | | | r171134). This makes the test not dependent on LLVM & won't vary/break based on LLVM codegen related changes. Appropriately testing at the Clang level what was fixed at the Clang level originally (in r124210). llvm-svn: 171175
* Update test for backend change.Eric Christopher2012-12-271-1/+1
| | | | | TODO: This test should be moved to the backend. llvm-svn: 171134
* Robustify the @encode code and add support for _Atomic.John McCall2012-12-201-0/+4
| | | | | | Fixes PR14628. llvm-svn: 170639
* Reapply r170344, this time without forgetting to commit the header changes.David Chisnall2012-12-171-0/+1
| | | | llvm-svn: 170354
* Revert "Added support for new property helpers (GNUstep runtime)."Benjamin Kramer2012-12-171-1/+0
| | | | | | This reverts commit r170344. Doesn't even compile. llvm-svn: 170351
* Added support for new property helpers (GNUstep runtime).David Chisnall2012-12-171-0/+1
| | | | llvm-svn: 170344
* Marking the objc_autoreleaseReturnValue and objc_retainAutoreleaseReturnValue Chad Rosier2012-12-125-10/+10
| | | | | | | | | | call sites as tail calls unconditionally. While it's theoretically true that this is just an optimization, it's an optimization that we very much want to happen even at -O0, or else ARC applications become substantially harder to debug. See r169796 for the llvm/fast-isel side of things. rdar://12553082 llvm-svn: 169996
* objective-C blocks: Check for record type when deciding if Fariborz Jahanian2012-12-111-0/+7
| | | | | | | byref variable requires extended layout info. to prevent a crash involving arrays declared __block. // rdar://12787751 llvm-svn: 169908
* Fix the required args count for variadic blocks.John McCall2012-12-071-0/+32
| | | | | | | | | | | | | | | | | We were emitting calls to blocks as if all arguments were required --- i.e. with signature (A,B,C,D,...) rather than (A,B,...). This patch fixes that and accounts for the implicit block-context argument as a required argument. In addition, this patch changes the function type under which we call unprototyped functions on platforms like x86-64 that guarantee compatibility of variadic functions with unprototyped function types; previously we would always call such functions under the LLVM type T (...)*, but now we will call them under the type T (A,B,C,D,...)*. This last change should have no material effect except for making the type conventions more explicit; it was a side-effect of the most convenient implementation. llvm-svn: 169588
* clang/test: Remove "REQUIRES:LP64" in two tests. Each of them have explicit ↵NAKAMURA Takumi2012-12-071-3/+0
| | | | | | triple. llvm-svn: 169587
* Rework the bitfield access IR generation to address PR13619 andChandler Carruth2012-12-061-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | generally support the C++11 memory model requirements for bitfield accesses by relying more heavily on LLVM's memory model. The primary change this introduces is to move from a manually aligned and strided access pattern across the bits of the bitfield to a much simpler lump access of all bits in the bitfield followed by math to extract the bits relevant for the particular field. This simplifies the code significantly, but relies on LLVM to intelligently lowering these integers. I have tested LLVM's lowering both synthetically and in benchmarks. The lowering appears to be functional, and there are no really significant performance regressions. Different code patterns accessing bitfields will vary in how this impacts them. The only real regressions I'm seeing are a few patterns where the LLVM code generation for loads that feed directly into a mask operation don't take advantage of the x86 ability to do a smaller load and a cheap zero-extension. This doesn't regress any benchmark in the nightly test suite on my box past the noise threshold, but my box is quite noisy. I'll be watching the LNT numbers, and will look into further improvements to the LLVM lowering as needed. llvm-svn: 169489
* objective-c blocks: Consider padding due to alignmentFariborz Jahanian2012-12-041-0/+60
| | | | | | | after the fixed size block header when generating captured block variable info. // rdar://12773256 llvm-svn: 169285
* objective-C blocks: Make sure that identical logic is usedFariborz Jahanian2012-11-281-0/+9
| | | | | | | | | | in deciding a copy/dispose field is needed in a byref structure and when generating the copy/dispose helpers. In certain cases, these fields were being added but no copy/dispose was being generated. This was uncovered in ARC, but not in MRR. // rdar://12759433 llvm-svn: 168825
* objective-C arc: load of a __weak object happens via call toFariborz Jahanian2012-11-274-4/+88
| | | | | | | | | | | objc_loadWeak. This retains and autorelease the weakly-refereced object. This hidden autorelease sometimes makes __weak variable alive even after the weak reference is erased, because the object is still referenced by an autorelease pool. This patch overcomes this behavior by loading a weak object via call to objc_loadWeakRetained(), followng it by objc_release at appropriate place, thereby removing the hidden autorelease. // rdar://10849570 llvm-svn: 168740
* block extended signatur option. Change previous optionFariborz Jahanian2012-11-151-3/+3
| | | | | | | | to a cc1 -fencode-extended-block-signature and pass it to cc1 and recognize this option to produce extended block type signature. // rdar://12109031 llvm-svn: 168063
* objective-C blocks: make cc1 flag -encode-extended-block-signatureFariborz Jahanian2012-11-151-2/+2
| | | | | | the default. // rdar://12109031 llvm-svn: 168007
* objective-C blocks: under cc1 flag -encode-extended-block-signature,Fariborz Jahanian2012-11-141-0/+15
| | | | | | | | generate expanded signature encoding to include types as we already do this for protocol method lists. // rdar://12109031 llvm-svn: 167997
* objective-C blocks: Provide layout map for byrefFariborz Jahanian2012-11-144-20/+57
| | | | | | variables captured in a block. // rdar://12184410 llvm-svn: 167931
* objective-C blocks: Change BLOCK_HAS_EXTENDED_LAYOUT to be 1<<31.Fariborz Jahanian2012-11-101-4/+4
| | | | | | lower 24bit is currently being used. llvm-svn: 167678
* Fix the Objective-C exception rethrow from cleanups (GNU runtimes). Note thatDavid Chisnall2012-11-071-1/+1
| | | | | | | a bug in the inliner still causes the wrong thing to happen at -O2 and above (PR14116). llvm-svn: 167534
* Put something sane in the DWARF offset field for bitfield ObjC ivars.Eli Friedman2012-11-061-0/+24
| | | | | | | | | This is useful because unnamed bitfields can have effects on the offsets which are not otherwise reflected in the DWARF information. <rdar://problem/12629719> llvm-svn: 167503
* Fix a silly mistake in r167437.Eli Friedman2012-11-061-16/+36
| | | | llvm-svn: 167487
* Minor fix to ObjC layout bitmap metadata. Found while I was trying toEli Friedman2012-11-061-3/+3
| | | | | | refactor the code. llvm-svn: 167436
* Tests for 32bit version of block ivar layout metadata.Fariborz Jahanian2012-11-053-0/+441
| | | | llvm-svn: 167387
* Fixes liftime of captured block variables in mrr mode, per John's feedback, asFariborz Jahanian2012-11-042-20/+20
| | | | | | well as couple of tests which were not being excercised because of TYPOs. llvm-svn: 167374
* Simplify these tests again, now that we're past the version skew.David Blaikie2012-11-032-2/+2
| | | | llvm-svn: 167346
* Avoid version skew by making ObjC strict metadata tests resilient to new field.David Blaikie2012-11-022-2/+2
| | | | llvm-svn: 167332
* objective-C mrr block. Block variable layout metadata inFariborz Jahanian2012-11-021-0/+59
| | | | | | mrr mode. llvm-svn: 167331
* Update the front end to use minsize attributeQuentin Colombet2012-11-011-0/+12
| | | | llvm-svn: 167266
* objective-C block meta-data. This patch completes meta-dataFariborz Jahanian2012-11-014-68/+535
| | | | | | | | generation for captured block variables in arc mode. This includes inlined version of the meta-data when it can be done. It also includes severat tests. This is wip. // rdar://12184410. llvm-svn: 167241
* Don't crash synthesizing an ObjC property with an empty struct type. ↵Eli Friedman2012-10-261-0/+11
| | | | | | <rdar://problem/12547611>. llvm-svn: 166825
* Correct test inovocations to use %clang_cc1 rather than direct invocation ↵David Tweed2012-10-252-2/+2
| | | | | | (so that it can have additional options set when trying to debug issues causing regressions). llvm-svn: 166681
* A number of test cases assume that an "int" parameter or return valueUlrich Weigand2012-10-241-1/+1
| | | | | | | | | | | | will be represented in the IR as a plain "i32" type. This causes the tests to spuriously fail on platforms where int is not a 32-bit type, or where the ABI requires attributes like "signext" or "zeroext" to be used. This patch adds -triple or -target parameters to force those tests to use the i386-unknown-unknown target. llvm-svn: 166551
* Revert r166541, "clang/test: Add appropriate requirements as REQUIRES, ↵NAKAMURA Takumi2012-10-242-4/+0
| | | | | | | | corresponding to r166532." According to r166543, it is not needed for now. llvm-svn: 166544
* clang/test: Add appropriate requirements as REQUIRES, corresponding to r166532.NAKAMURA Takumi2012-10-242-0/+4
| | | | llvm-svn: 166541
* Set a special flag in class metadata when an Objective-C classJohn McCall2012-10-171-1/+4
| | | | | | | | | has ivars that require destruction, but none that require anything except zero-initialization. This is common in ARC and (when true throughout a class hierarchy) permits the elimination of an unnecessary message-send during allocation. llvm-svn: 166088
* At -O0, prefer objc_storeStrong with a null new value to theJohn McCall2012-10-178-22/+77
| | | | | | | | | | | combination of a load+objc_release; this is generally better for tools that try to track why values are retained and released. Also use objc_storeStrong when copying a block (again, only at -O0), which requires us to do a preliminary store of null in order to compensate for objc_storeStrong's assign semantics. llvm-svn: 166085
* GNUstep runtime version default to 1.6, generate correct property attributeDavid Chisnall2012-10-161-0/+15
| | | | | | metadata. llvm-svn: 166023
* Un-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.Daniel Dunbar2012-10-153-1/+67
| | | | llvm-svn: 165988
* Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6.Nico Weber2012-10-153-67/+1
| | | | | | See PR14013. llvm-svn: 165962
* objective-C IRgen: When sending a method to 'super'Fariborz Jahanian2012-10-101-11/+21
| | | | | | | | | in a category class method, don't read 'isa' pointer. Instead, save the desired OBJC_METACLASS_$_ClassName in __DATA,__objc_superrefs and read that without reading any isa pointers. // rdar://12459358 llvm-svn: 165674
* Make sure to generate the right kind of MDNode for enum forward declarations.Eli Friedman2012-10-051-1/+1
| | | | | | PR14029, clang part. llvm-svn: 165289
* Re-enable this test to reflect re-enabling the new SROA pass.Chandler Carruth2012-10-021-4/+0
| | | | llvm-svn: 164987
* Add Clang support for iOS6.Bob Wilson2012-09-293-1/+67
| | | | llvm-svn: 164907
* Turn off this test, as the new and old SROA cause it produce different output.Nick Lewycky2012-09-261-0/+4
| | | | | | | Left in a note that we need to turn it back on once the SROA fallout is cleared up. llvm-svn: 164733
* During jump-scope checking, build an ExprWithCleanups immediatelyJohn McCall2012-09-251-0/+57
| | | | | | | | | | | | into the enclosing scope; this is a more accurate model but is (I believe) unnecessary in my test case due to other flaws. However, one of those flaws is now intentional: blocks which appear in return statements can be trivially observed to not extend in lifetime past the return, and so we can allow a jump past them. Do the necessary magic in IR-generation to make this work. llvm-svn: 164589
* Update the Clang tests which run with a full optimization pipeline forChandler Carruth2012-09-241-2/+2
| | | | | | | the new SROA pass. This is a benign change: the order of PHI nodes changed. llvm-svn: 164481
* Disable some tests that fail when the x86 backend isn't built.Benjamin Kramer2012-09-182-0/+3
| | | | llvm-svn: 164122
* Reapply:Eric Christopher2012-09-121-2/+6
| | | | | | | | | | | Make clang emit a flag for DW_AT_object_pointer for the artificial args where it should (implicit first arguments). FileCheck-ize a test as well and update tests to take into account the object pointer flag. rdar://9797999 llvm-svn: 163755
* Revert "Make clang emit a flag for DW_AT_object_pointer for the artificial"Eric Christopher2012-09-121-6/+2
| | | | | | this should be done on the subprogram, not the variable. llvm-svn: 163733
OpenPOWER on IntegriCloud