aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenObjC
AgeCommit message (Collapse)Author
2012-10-17Set a special flag in class metadata when an Objective-C classJohn McCall
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166088 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-17At -O0, prefer objc_storeStrong with a null new value to theJohn McCall
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166085 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-16GNUstep runtime version default to 1.6, generate correct property attributeDavid Chisnall
metadata. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166023 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-15Un-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165988 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-15Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6.Nico Weber
See PR14013. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165962 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-10objective-C IRgen: When sending a method to 'super'Fariborz Jahanian
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165674 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-05Make sure to generate the right kind of MDNode for enum forward declarations.Eli Friedman
PR14029, clang part. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165289 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-02Re-enable this test to reflect re-enabling the new SROA pass.Chandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164987 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-29Add Clang support for iOS6.Bob Wilson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164907 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-26Turn off this test, as the new and old SROA cause it produce different output.Nick Lewycky
Left in a note that we need to turn it back on once the SROA fallout is cleared up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164733 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-25During jump-scope checking, build an ExprWithCleanups immediatelyJohn McCall
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164589 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-24Update the Clang tests which run with a full optimization pipeline forChandler Carruth
the new SROA pass. This is a benign change: the order of PHI nodes changed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164481 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-18Disable some tests that fail when the x86 backend isn't built.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164122 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-12Reapply:Eric Christopher
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163755 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-12Revert "Make clang emit a flag for DW_AT_object_pointer for the artificial"Eric Christopher
this should be done on the subprogram, not the variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163733 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-12clang/test: [PR13820] Suppress LLP64-incompatible tests for ObjC with +Asserts.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163709 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-12clang/test/CodeGenObjC: [PR13820] Suppress LLP64-incompatible tests.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163701 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-12clang/test: [PR8833] Introduce the feature "LP64" to suppress ↵NAKAMURA Takumi
LLP64-incompatible tests. I think some of them could be rewritten to fit also LLP64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163699 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-12Make clang emit a flag for DW_AT_object_pointer for the artificialEric Christopher
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163668 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07In ARC, if we're emitting assembly markers for calls toJohn McCall
objc_retainAutoreleasedReturnValue, we need to also be killing them during return peepholing. Make sure we recognize an intervening bitcast, but more importantly, assert if we can't find the asm marker at all. rdar://problem/12133032 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163431 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-06Fixing the return type information for objc_sync_enter and objc_sync_exit. ↵Aaron Ballman
Patch thanks to Joe Ranieri! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163330 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-29Fix PR reference in test.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162866 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-29Fix run-line for test.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162865 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-29Make alignment computation for pointer values for builtins handleEli Friedman
non-pointer types with a pointer representation correctly. PR13660. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162862 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27Restore a -cc1 invariant that was causing problems on PPC64.John McCall
This test case is pretty bad, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162694 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-20Fix a pair of bugs relating to properties in ARC.John McCall
First, when synthesizing an explicitly strong/retain/copy property of Class type, don't pretend during compatibility checking that the property is actually assign. Instead, resolve incompatibilities by secretly changing the type of *implicitly* __unsafe_unretained Class ivars to be strong. This is moderately evil but better than what we were doing. Second, when synthesizing the setter for a strong property of non-retainable type, be sure to use objc_setProperty. This is possible when the property is decorated with the NSObject attribute. This is an ugly, ugly corner of the language, and we probably ought to deprecate it. The first is rdar://problem/12039404; the second was noticed by inspection while fixing the first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162244 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-17Fix broken check lines.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162096 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-07objc-arc: set nonlazybind attribute on objc_retain/Fariborz Jahanian
objc_release for performance for these most often called APIs. // rdar://12040837 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161448 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20Don't need to specify the abi as it's the default.Eric Christopher
rdar://11842763 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160554 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-19FileCheck-ize.Eric Christopher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160528 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-19Reset the layout of an ObjC class if we see an ivar in a categoryEric Christopher
or implementation since we've now got a different layout. Fixes rdar://11842763 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160526 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-12Add the ObjFW runtime. Patch by Jonathan Schleifer!John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160102 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-03Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstepDavid Chisnall
runtime to gnustep from gnu. Fix EH for the GCC runtime. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159684 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-29objective-c IRGen: fixes a crash when method type is being mangledFariborz Jahanian
when an argument type size is 0. // rdar://11777609, PR13229 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159472 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26block literal irgen: several improvements on naming blockFariborz Jahanian
literal helper functions. All helper functions (global and locals) use block_invoke as their prefix. Local literal helper names are prefixed by their enclosing mangled function names. Blocks in non-local initializers (e.g. a global variable or a C++11 field) are prefixed by their mangled variable name. The descriminator number added to end of the name starts off with blank (for first block) and _<N> (for the N+2-th block). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159206 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-20Restructure how the driver communicates information about theJohn McCall
target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158793 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-19objc-arc: captured block variable accessed in its block literalFariborz Jahanian
initializer need be null initialized before initializer takes hold, just like any other initialized retainable object pointer. // rdar://11016025 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158738 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-29objective-c: fix a sema and IRGen crash when propertyFariborz Jahanian
getter result type is safe but does not match with property type resulting in spurious warning followed by crash in IRGen. // rdar://11515196 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157641 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15Add documentation about boxing enum types and a codegen test to makeArgyrios Kyrtzidis
sure we pick up the underlying type, per suggestion by Fariborz. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156851 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-13Test for -fdebugger-objc-literal: missing methods should be generated like ↵Jordy Rose
missing classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156746 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-11Add a test case for going through typedefs until we reach "BOOL", that ↵Argyrios Kyrtzidis
NSAPI::isObjCTypedef() is doing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156604 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10[objc] When boxing a BOOL/NSInteger/NSUInteger type, use the correspondingArgyrios Kyrtzidis
numberWithBool:/numberWithInteger:/numberWithUnsignedInteger: NSNumber selectors. rdar://11428703 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156583 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-26Test case for previosu patch.Fariborz Jahanian
// rdar://11323676 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155664 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23Forward declarations should take a context. This helps the debuggerEric Christopher
find forward declarations in the context that the actual definition will occur. rdar://11291658 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155381 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20minor improvement to couple of tests.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155204 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19Implements boxed expressions for Objective-C. <rdar://problem/10194391>Patrick Beard
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155082 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-12The copy and destroy helper functions aren't prototyped, don't call themEric Christopher
so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154569 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-11Add a triple to this test.Eric Christopher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154485 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-11Try to fix the windows buildbots by making this test a little lessEric Christopher
dependent upon metadata ordering. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154482 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-11Enable debug info for objective c implementations that may not haveEric Christopher
an explicit instance variable. rdar://10590352 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154481 91177308-0d34-0410-b5e6-96231b3b80d8