summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate/Transforms.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-2/+1
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* [arcmt] NSInvocation's [get/set]ReturnValue and [get/set]Argument are only safeArgyrios Kyrtzidis2011-07-181-0/+1
| | | | | | with __unsafe_unretained parameters. Emit error for strong/weak ones. rdar://9206226 llvm-svn: 135381
* [arcmt] Don't remove retains/releases on a global variable, flag them with ↵Argyrios Kyrtzidis2011-07-141-0/+11
| | | | | | errors. rdar://9402555. llvm-svn: 135213
* Convert terminology in the Lexer from 'instantiate' and variants toChandler Carruth2011-07-141-1/+1
| | | | | | | | | 'expand'. Also update the public API it provides to the new term, and propagate that update to the various clients. No functionality changed. llvm-svn: 135138
* [arcmt] For properties rewrite 'assign' -> 'weak or unsafe_unretained', ↵Argyrios Kyrtzidis2011-07-131-1/+1
| | | | | | | | 'retain' -> 'strong', and add 'weak or unsafe_unretained' when 'assign' is missing. rdar://9496219&9602589. llvm-svn: 135065
* [arcmt] Also avoid 'weak' for forward references to objc classes.Argyrios Kyrtzidis2011-07-121-0/+2
| | | | llvm-svn: 135003
* [arcmt] Before applying '__weak' check whether the objc class is annotated ↵Argyrios Kyrtzidis2011-07-121-0/+55
| | | | | | | | | | with objc_arc_weak_reference_unavailable or is in a list of classes not supporting 'weak'. rdar://9489367. llvm-svn: 135002
* Move SourceManager::isAt[Start/End]OfMacroInstantiation functions to the ↵Argyrios Kyrtzidis2011-07-071-1/+1
| | | | | | Lexer, since they depend on it now. llvm-svn: 134644
* In ARC, reclaim all return values of retainable type, not just thoseJohn McCall2011-07-071-6/+3
| | | | | | | | | | | | where we have an immediate need of a retained value. As an exception, don't do this when the call is made as the immediate operand of a __bridge retain. This is more in the way of a workaround than an actual guarantee, so it's acceptable to be brittle here. rdar://problem/9504800 llvm-svn: 134605
* Make the Preprocessor more memory efficient and improve macro instantiation ↵Argyrios Kyrtzidis2011-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | diagnostics. When a macro instantiation occurs, reserve a SLocEntry chunk with length the full length of the macro definition source. Set the spelling location of this chunk to point to the start of the macro definition and any tokens that are lexed directly from the macro definition will get a location from this chunk with the appropriate offset. For any tokens that come from argument expansion, '##' paste operator, etc. have their instantiation location point at the appropriate place in the instantiated macro definition (the argument identifier and the '##' token respectively). This improves macro instantiation diagnostics: Before: t.c:5:9: error: invalid operands to binary expression ('struct S' and 'int') int y = M(/); ^~~~ t.c:5:11: note: instantiated from: int y = M(/); ^ After: t.c:5:9: error: invalid operands to binary expression ('struct S' and 'int') int y = M(/); ^~~~ t.c:3:20: note: instantiated from: \#define M(op) (foo op 3); ~~~ ^ ~ t.c:5:11: note: instantiated from: int y = M(/); ^ The memory savings for a candidate boost library that abuses the preprocessor are: - 32% less SLocEntries (37M -> 25M) - 30% reduction in PCH file size (900M -> 635M) - 50% reduction in memory usage for the SLocEntry table (1.6G -> 800M) llvm-svn: 134587
* [arcmt] Remove rewriteAllocCopyWithZone transformation; not needed anymore.Argyrios Kyrtzidis2011-06-231-1/+0
| | | | llvm-svn: 133762
* [arcmt] Merge 'removeEmptyStatements' and 'removeDeallocMethod' passes to ↵Argyrios Kyrtzidis2011-06-211-5/+2
| | | | | | | | cut down on one compilation pass and increase migration speed. llvm-svn: 133540
* [arcmt] Break apart Transforms.cpp.Argyrios Kyrtzidis2011-06-211-1941/+89
| | | | llvm-svn: 133539
* [arcmt] Always add '__bridge' cast when 'self' is cast to a C pointer. ↵Argyrios Kyrtzidis2011-06-201-33/+29
| | | | | | rdar://9644061 llvm-svn: 133480
* Objective-C fast enumeration loop variables are not retained in ARC, butJohn McCall2011-06-171-4/+1
| | | | | | | | | | | | they should still be officially __strong for the purposes of errors, block capture, etc. Make a new bit on variables, isARCPseudoStrong(), and set this for 'self' and these enumeration-loop variables. Change the code that was looking for the old patterns to look for this bit, and change IR generation to find this bit and treat the resulting variable as __unsafe_unretained for the purposes of init/destroy in the two places it can come up. llvm-svn: 133243
* The ARC Migration Tool. All the credit goes to Argyrios and FariborzJohn McCall2011-06-151-0/+2094
for this. llvm-svn: 133104
OpenPOWER on IntegriCloud