summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC
Commit message (Collapse)AuthorAgeFilesLines
* Restore a -cc1 invariant that was causing problems on PPC64.John McCall2012-08-271-1/+1
| | | | | | This test case is pretty bad, though. llvm-svn: 162694
* Fix a pair of bugs relating to properties in ARC.John McCall2012-08-201-0/+72
| | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 162244
* Fix broken check lines.Benjamin Kramer2012-08-172-9/+9
| | | | llvm-svn: 162096
* objc-arc: set nonlazybind attribute on objc_retain/Fariborz Jahanian2012-08-071-0/+3
| | | | | | | objc_release for performance for these most often called APIs. // rdar://12040837 llvm-svn: 161448
* Don't need to specify the abi as it's the default.Eric Christopher2012-07-201-1/+1
| | | | | | rdar://11842763 llvm-svn: 160554
* FileCheck-ize.Eric Christopher2012-07-191-24/+23
| | | | llvm-svn: 160528
* Reset the layout of an ObjC class if we see an ivar in a categoryEric Christopher2012-07-191-0/+35
| | | | | | | | or implementation since we've now got a different layout. Fixes rdar://11842763 llvm-svn: 160526
* Add the ObjFW runtime. Patch by Jonathan Schleifer!John McCall2012-07-121-0/+15
| | | | llvm-svn: 160102
* Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstepDavid Chisnall2012-07-036-8/+8
| | | | | | runtime to gnustep from gnu. Fix EH for the GCC runtime. llvm-svn: 159684
* objective-c IRGen: fixes a crash when method type is being mangledFariborz Jahanian2012-06-291-0/+19
| | | | | | when an argument type size is 0. // rdar://11777609, PR13229 llvm-svn: 159472
* block literal irgen: several improvements on naming blockFariborz Jahanian2012-06-263-6/+6
| | | | | | | | | | | | 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). llvm-svn: 159206
* Restructure how the driver communicates information about theJohn McCall2012-06-2083-126/+126
| | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 158793
* objc-arc: captured block variable accessed in its block literalFariborz Jahanian2012-06-191-0/+11
| | | | | | | | initializer need be null initialized before initializer takes hold, just like any other initialized retainable object pointer. // rdar://11016025 llvm-svn: 158738
* objective-c: fix a sema and IRGen crash when propertyFariborz Jahanian2012-05-291-0/+35
| | | | | | | | getter result type is safe but does not match with property type resulting in spurious warning followed by crash in IRGen. // rdar://11515196 llvm-svn: 157641
* Add documentation about boxing enum types and a codegen test to makeArgyrios Kyrtzidis2012-05-151-0/+7
| | | | | | | | sure we pick up the underlying type, per suggestion by Fariborz. No functionality change. llvm-svn: 156851
* Test for -fdebugger-objc-literal: missing methods should be generated like ↵Jordy Rose2012-05-131-0/+21
| | | | | | missing classes. llvm-svn: 156746
* Add a test case for going through typedefs until we reach "BOOL", that ↵Argyrios Kyrtzidis2012-05-111-0/+2
| | | | | | NSAPI::isObjCTypedef() is doing. llvm-svn: 156604
* [objc] When boxing a BOOL/NSInteger/NSUInteger type, use the correspondingArgyrios Kyrtzidis2012-05-101-0/+86
| | | | | | | | numberWithBool:/numberWithInteger:/numberWithUnsignedInteger: NSNumber selectors. rdar://11428703 llvm-svn: 156583
* Test case for previosu patch.Fariborz Jahanian2012-04-261-0/+20
| | | | | | // rdar://11323676 llvm-svn: 155664
* Forward declarations should take a context. This helps the debuggerEric Christopher2012-04-232-2/+2
| | | | | | | | | find forward declarations in the context that the actual definition will occur. rdar://11291658 llvm-svn: 155381
* minor improvement to couple of tests.Fariborz Jahanian2012-04-201-0/+2
| | | | llvm-svn: 155204
* Implements boxed expressions for Objective-C. <rdar://problem/10194391>Patrick Beard2012-04-191-1/+15
| | | | llvm-svn: 155082
* The copy and destroy helper functions aren't prototyped, don't call themEric Christopher2012-04-121-1/+1
| | | | | | so. llvm-svn: 154569
* Add a triple to this test.Eric Christopher2012-04-111-1/+1
| | | | llvm-svn: 154485
* Try to fix the windows buildbots by making this test a little lessEric Christopher2012-04-111-1/+1
| | | | | | dependent upon metadata ordering. llvm-svn: 154482
* Enable debug info for objective c implementations that may not haveEric Christopher2012-04-114-4/+20
| | | | | | | | an explicit instance variable. rdar://10590352 llvm-svn: 154481
* Revert r154321, pending more discussion.David Chisnall2012-04-091-13/+0
| | | | llvm-svn: 154327
* Add -fobjc-trace to emit a call before and after each Objective-C message sendDavid Chisnall2012-04-091-0/+13
| | | | | | for hooking in code flow visualisation applications. llvm-svn: 154321
* Enhance testing a bit to make sure that we're omitting theEric Christopher2012-04-051-0/+2
| | | | | | | | | getter and setter when they're synthesized with the default names. rdar://11179756 llvm-svn: 154130
* Only emit the getter and setter names if they're not the defaultEric Christopher2012-04-053-5/+1
| | | | | | | | synthesized ones. Reasonable debug info size reduction for objc. rdar://11179756 llvm-svn: 154129
* Enter an expression evaluation context when parsingJohn McCall2012-04-041-0/+7
| | | | | | | statement-expressions. Prevents cleanups and such from being claimed by the first full-expression in the block. llvm-svn: 153989
* Change location information for synthesized properties to be at theEric Christopher2012-04-033-2/+37
| | | | | | | | | | | | | | | | | | property file/line rather than the @synthesize file/line. Avoids some nasty confusing-ness with conflating the file from the scope and the line from the original declaration. Use the current scope location as a separate parameter so that we can match it up better in the line table with the beginning of the scope. Update a couple of testcases accordingly since I had to change that we actually use the passed in location in EmitFunctionStart and for the new metadata parameter and add a new testcase to make sure we've got the right line numbers for synthesized properties. Part of rdar://11026482 llvm-svn: 153917
* Revert previous commit changing location information to see if thisEric Christopher2012-03-303-37/+2
| | | | | | is causing the gdb test failures on the bots. llvm-svn: 153727
* Make sure we perform the relevant implied conversions correctly for ObjC ↵Eli Friedman2012-03-301-12/+4
| | | | | | methods with related result types. PR12384. llvm-svn: 153716
* Testcase for the previous commit.Eric Christopher2012-03-301-0/+34
| | | | llvm-svn: 153715
* Change location information for synthesized properties to be at theEric Christopher2012-03-302-2/+3
| | | | | | | | | | | | | property file/line rather than the @synthesize file/line. Avoids some nasty confusing-ness with conflating the file from the scope and the line from the original declaration. Update a couple of testcases accordingly since I had to change that we actually use the passed in location in EmitFunctionStart. Fixes rdar://11026482 llvm-svn: 153714
* The UTF16 string referenced by a CFString should go into the __TEXT,__ustringBill Wendling2012-03-301-1/+1
| | | | | | | | | | | | | section. A 'normal' string will go into the __TEXT,__const section, but this isn't good for UTF16 strings. The __ustring section allows for coalescing, among other niceties (such as allowing the linker to easily split up strings). Instead of outputting the UTF16 string as a series of bytes, output it as a series of shorts. The back-end will then nicely place the UTF16 string into the correct section, because it's a mensch. <rdar://problem/10655949> llvm-svn: 153710
* Go back to using just the selector name for the getter and setterEric Christopher2012-03-291-1/+1
| | | | | | | | in the property debug info. Any more isn't necessary after all. rdar://11144023 llvm-svn: 153659
* Add support for objc property decls according to the page at:Eric Christopher2012-03-291-1/+1
| | | | | | | | | | | http://llvm.org/docs/SourceLevelDebugging.html#objcproperty including type and DECL. Expand the getter and setter names into the fully qualified names. rdar://11144023 llvm-svn: 153640
* Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,Ted Kremenek2012-03-069-0/+447
| | | | | | | | | | | | | NSNumber, and boolean literals. This includes both Sema and Codegen support. Included is also support for new Objective-C container subscripting. My apologies for the large patch. It was very difficult to break apart. The patch introduces changes to the driver as well to cause clang to link in additional runtime support when needed to support the new language features. Docs are forthcoming to document the implementation and behavior of these features. llvm-svn: 152137
* Test is fixed.Fariborz Jahanian2012-02-231-9/+15
| | | | llvm-svn: 151280
* XFAIL test until I figure out how to make test pass on different platforms.Fariborz Jahanian2012-02-231-0/+1
| | | | llvm-svn: 151277
* Change test again so it passes in build-bot until I can figure out what isFariborz Jahanian2012-02-231-2/+2
| | | | | | going on. llvm-svn: 151275
* fix test for patch in r151268.Fariborz Jahanian2012-02-231-2/+2
| | | | llvm-svn: 151272
* objective-c default synthesis. classes which adopt protocol propertiesFariborz Jahanian2012-02-231-0/+30
| | | | | | | must still auto synthesize those propeties which have been redeclared in the class. // rdar://10907410 llvm-svn: 151268
* Try to handle qualifiers more consistently for array InitListExprs. Fixes ↵Eli Friedman2012-02-231-0/+4
| | | | | | | | <rdar://problem/10907510>, and makes the ASTs a bit more self-consistent. (I've chosen to keep the qualifiers, but it isn't a strong preference; if anyone prefers removing them, please yell.) llvm-svn: 151229
* Make sure null initialization in arrays works correctly with ARC types. ↵Eli Friedman2012-02-221-0/+12
| | | | | | <rdar://problem/10907547>. llvm-svn: 151133
* objc IRGen: force CSE of load of ivar offsets by settingFariborz Jahanian2012-02-201-0/+29
| | | | | | | the 'invariant.load' metadata tag onto those loads. // rdar://10840980 llvm-svn: 150994
* Make test case less sensitive to metadata numbering.Chad Rosier2012-02-201-1/+1
| | | | llvm-svn: 150983
* Remove the type retaining from the clang frontend. This is nowEric Christopher2012-02-201-1/+1
| | | | | | | | | | handled by the caching and rauw. Also fix one cache that wasn't being added to highlighted by this patch. Update all testcases accordingly. This should fix the deall failure. llvm-svn: 150977
OpenPOWER on IntegriCloud