summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate
Commit message (Collapse)AuthorAgeFilesLines
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-054-8/+8
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Basic: import OwningPtr<> into clang namespaceDylan Noblesmith2012-02-054-9/+9
| | | | llvm-svn: 149798
* Move a method from IdentifierTable.h out of line and remove the SmallString ↵Benjamin Kramer2012-02-042-0/+2
| | | | | | | | include. Fix all the transitive include users. llvm-svn: 149783
* arc migrator: twik previous patch to exclude user providedFariborz Jahanian2012-01-311-1/+1
| | | | | | explicit type cast. // rdar://10521744 llvm-svn: 149437
* arc migrator: Do not attempt to migrate to bridge casts which Fariborz Jahanian2012-01-311-0/+15
| | | | | | | cancel out each other. Leave it alone so users can take a look (unmigrated code forces error diagnostic). // rdar://10521744 llvm-svn: 149435
* objc-arc: introduce -no-finalize-removal which in gc mode,Fariborz Jahanian2012-01-262-3/+48
| | | | | | | | leaves "finalize' behind and in arc mode, does not include it. This allows the migrated source to be compiled in both gc and arc mode. // rdar://10532441 llvm-svn: 149079
* arc migrator: Added an option to the migratorFariborz Jahanian2012-01-262-0/+4
| | | | | | unused yet. llvm-svn: 149001
* arc migrator: Provide infrastructure to add optionsFariborz Jahanian2012-01-254-4/+36
| | | | | | | | | specific to migrator. Use its first option to warn migrating from GC to arc when NSAllocateCollectable/NSReallocateCollectable is used. // rdar://10532541 llvm-svn: 148887
* arg migrator: change all "assign" of object propertiesFariborz Jahanian2012-01-211-9/+11
| | | | | | to "strong" when migrating from GC. // rdar://10532449 llvm-svn: 148607
* arc migrator: replace "retain" attribute with "strong"Fariborz Jahanian2012-01-201-4/+6
| | | | | | | which have same semantics in mrr as well as arr. // rdar://10688312 llvm-svn: 148559
* Extract the (InputKind, std::string) pair used to describe inputs toDouglas Gregor2012-01-202-19/+17
| | | | | | | the front end into its own class, FrontendInputFile, to make it easier to introduce new per-input data. No functionality change. llvm-svn: 148546
* For Lexer's isAt[Start/End]OfMacroExpansion add an out parameter for the macroArgyrios Kyrtzidis2012-01-191-2/+1
| | | | | | | | | start/end location. It is commonly needed after calling the function; with this way we avoid recalculating it. llvm-svn: 148479
* Remove unused variables.Rafael Espindola2011-12-251-2/+1
| | | | llvm-svn: 147260
* Keep track of all declarations of an Objective-C class (both forwardDouglas Gregor2011-12-151-1/+1
| | | | | | | | | | declarations and definitions) as ObjCInterfaceDecls within the same redeclaration chain. This new representation matches what we do for C/C++ variables/functions/classes/templates/etc., and makes it possible to answer the query "where are all of the declarations of this class?" llvm-svn: 146679
* [arcmt] Integrate GC __weak into property attributes even when we don't haveArgyrios Kyrtzidis2011-11-284-49/+62
| | | | | | the implementation. llvm-svn: 145224
* [arcmt] Don't add __weak if there is already a GC __weak and make sure to clearArgyrios Kyrtzidis2011-11-282-7/+14
| | | | | | __weak from a readonly property. llvm-svn: 145210
* Refine placement of LangOptions object in CompilerInvocation by adding a new ↵Ted Kremenek2011-11-181-1/+0
| | | | | | baseclass CompilerInvocationBase with a custom copy constructor. This ensures that whenever the CompilerInvocation object's copy constructor is used we always clone the LangOptions object. llvm-svn: 144973
* Make 'LangOptions' in CompilerInvocation a heap-allocated, reference counted ↵Ted Kremenek2011-11-171-11/+12
| | | | | | | | | | | | | | | | | object. I discovered that llvm::RefCountedBase<T> has a bug where the reference count is copied in the copy constructor, which means that there were cases when the CompilerInvocation objects created by ASTUnit were actually leaked. When I fixed that bug locally, it showed that a whole bunch of code assumed that the LangOptions object that was part of CompilerInvocation was still alive. By making it heap-allocated and reference counted, we can keep it around after the CompilerInvocation object goes away. As part of this change, change CompilerInvocation:getLangOptions() to return a pointer, acting as another clue that this object may outlive the CompilerInvocation object. This commit doesn't fix the CompilerInvocation leak itself. That will come when I commit the fix to llvm::RefCountedBase<T> to mainline LLVM. llvm-svn: 144930
* [arcmt] Take into account that all properties are strong-by-default now and ↵Argyrios Kyrtzidis2011-11-081-42/+7
| | | | | | fix the test. llvm-svn: 144146
* [arcmt] Now that readonly properties are strong-by-default, do not add ↵Argyrios Kyrtzidis2011-11-081-1/+1
| | | | | | redundant 'strong'. llvm-svn: 144136
* [arcmt] Now that properties are strong by default, avoid adding redundant ↵Argyrios Kyrtzidis2011-11-081-2/+4
| | | | | | | | '(strong)' property attribute. llvm-svn: 144078
* [arcmt] NSViewController does not support weak.Argyrios Kyrtzidis2011-11-081-0/+1
| | | | llvm-svn: 144077
* [arcmt] When we already removed a __weak, don't try to change it to ↵Argyrios Kyrtzidis2011-11-082-2/+6
| | | | | | | | __unsafe_unretained later on, or we will end up with a redundant '__unsafe_unretained'. llvm-svn: 144059
* [arcmt] Fix handling NSMakeCollectable inside an objc method.Argyrios Kyrtzidis2011-11-071-1/+2
| | | | llvm-svn: 143980
* [arcmt] In GC, handle (assign) @properties.Argyrios Kyrtzidis2011-11-074-130/+269
| | | | | | | | | -Move __strong/__weak added to a property type to the property attribute, e.g. "@property (assign) __weak Foo *prop;" --> "@property (weak) Foo *prop;" -Remove (assign) in a property so that it becomes strong-by-default in ARC. llvm-svn: 143979
* [arcmt] Map property decls to their GC attributes.Argyrios Kyrtzidis2011-11-073-3/+12
| | | | llvm-svn: 143978
* [arcmt] In GC, change '__weak' -> '__unsafe_unretained' when appliedArgyrios Kyrtzidis2011-11-073-5/+33
| | | | | | to objects of classes that don't support ARC weak llvm-svn: 143976
* [arcmt] In GC, error for __strong/__weak on non-objc pointers.Argyrios Kyrtzidis2011-11-061-0/+18
| | | | llvm-svn: 143887
* [arcmt] In GC, clear redundant __strong's.Argyrios Kyrtzidis2011-11-062-8/+34
| | | | llvm-svn: 143886
* [arcmt] Make PropertiesRewriter::getPropertyType return the unqualified type.Argyrios Kyrtzidis2011-11-061-4/+3
| | | | llvm-svn: 143884
* [arcmt] Collect all the places where GC attributes __strong/__weak occur.Argyrios Kyrtzidis2011-11-066-6/+224
| | | | llvm-svn: 143883
* [arcmt] Refactor PropertiesRewriter to use MigrationContext.Argyrios Kyrtzidis2011-11-063-4/+35
| | | | llvm-svn: 143882
* Change the AST representation of operations on Objective-CJohn McCall2011-11-063-23/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | property references to use a new PseudoObjectExpr expression which pairs a syntactic form of the expression with a set of semantic expressions implementing it. This should significantly reduce the complexity required elsewhere in the compiler to deal with these kinds of expressions (e.g. IR generation's special l-value kind, the static analyzer's Message abstraction), at the lower cost of specifically dealing with the odd AST structure of these expressions. It should also greatly simplify efforts to implement similar language features in the future, most notably Managed C++'s properties and indexed properties. Most of the effort here is in dealing with the various clients of the AST. I've gone ahead and simplified the ObjC rewriter's use of properties; other clients, like IR-gen and the static analyzer, have all the old complexity *and* all the new complexity, at least temporarily. Many thanks to Ted for writing and advising on the necessary changes to the static analyzer. I've xfailed a small diagnostics regression in the static analyzer at Ted's request. llvm-svn: 143867
* [arcmt] Fix an assertion hit in rdar://10336125; a bit too complicated to ↵Argyrios Kyrtzidis2011-11-051-0/+3
| | | | | | reduce. llvm-svn: 143754
* [arcmt] In GC, error out when there is a call that returns a pointer toArgyrios Kyrtzidis2011-11-044-0/+43
| | | | | | GC managed non-objc object memory. llvm-svn: 143747
* [arcmt] For GC, cleanup and turn -finalize to -dealloc.Argyrios Kyrtzidis2011-11-045-20/+54
| | | | llvm-svn: 143701
* [arcmt] In GC, error for use of CFMakeCollectable because it will leak theArgyrios Kyrtzidis2011-11-041-5/+15
| | | | | | object that it receives in ARC. llvm-svn: 143700
* In C++ keep unavailable function calls in the AST, like in C/ObjC.Argyrios Kyrtzidis2011-11-041-0/+1
| | | | | | This allows the migrator to visit and fix them. llvm-svn: 143699
* [arcmt] In GC, transform NSMakeCollectable to CFBridgingRelease.Argyrios Kyrtzidis2011-11-046-8/+181
| | | | llvm-svn: 143698
* Further refine the diagnostic categories for ARC diagnostics. Addresses ↵Ted Kremenek2011-10-202-12/+1
| | | | | | <rdar://problem/10245086>. llvm-svn: 142571
* [arcmt] Rewrite attributes in extensions as well. rdar://9992142Argyrios Kyrtzidis2011-10-181-17/+83
| | | | llvm-svn: 142407
* Revert r142311, -mios-simulator-version-min does not work correctly.Argyrios Kyrtzidis2011-10-181-0/+43
| | | | llvm-svn: 142322
* Remove the hack where we sniff the __IPHONE_OS_VERSION_MIN_REQUIRED define.Argyrios Kyrtzidis2011-10-171-43/+0
| | | | | | We can use -mios-simulator-version-min now. rdar://10218700 llvm-svn: 142311
* [arcmt] In ARC default for properties is 'strong' so just remove a 'retain' ↵Argyrios Kyrtzidis2011-10-171-3/+37
| | | | | | | | if possible, instead of changing it to 'strong'. rdar://9984862. llvm-svn: 142304
* Introduce a pure virtual clone() method to DiagnosticConsumer, so thatDouglas Gregor2011-09-291-1/+7
| | | | | | | | | we have the ability to create a new, distict diagnostic consumer when we go off and build a module. This avoids the currently horribleness where the same diagnostic consumer sees diagnostics for multiple translation units (and multiple SourceManagers!) causing all sorts of havok. llvm-svn: 140743
* When 'bool' is not a built-in type but is defined as a macro, printDouglas Gregor2011-09-271-3/+3
| | | | | | | 'bool' rather than '_Bool' within types, to make things a bit more readable. Fixes <rdar://problem/10063263>. llvm-svn: 140650
* Rename DiagnosticInfo to Diagnostic as per issue 5397David Blaikie2011-09-261-1/+1
| | | | llvm-svn: 140493
* Rename CaptureDiagnosticClient to CaptureDiagnosticConsumer as per issue 5397David Blaikie2011-09-251-4/+4
| | | | llvm-svn: 140482
* Rename DiagnosticClient to DiagnosticConsumer as per issue 5397David Blaikie2011-09-251-9/+9
| | | | llvm-svn: 140479
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-255-32/+32
| | | | llvm-svn: 140478
OpenPOWER on IntegriCloud