summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate/ARCMT.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-7/+7
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-061-4/+42
| | | | | | | | | | | the new Objective-C NSArray/NSDictionary/NSNumber literal syntax. This introduces a new library, libEdit, which provides a new way to support migration of code that improves on the original ARC migrator. We now believe that most of its functionality can be refactored into the existing libraries, and thus this new library may shortly disappear. llvm-svn: 152141
* Basic: import IntrusiveRefCntPtr<> into clang namespaceDylan Noblesmith2012-02-201-12/+12
| | | | | | | The class name is long enough without the llvm:: added. Also bring in RefCountedBase and RefCountedBaseVPTR. llvm-svn: 150958
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-2/+2
| | | | | | | (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-051-6/+6
| | | | llvm-svn: 149798
* objc-arc: introduce -no-finalize-removal which in gc mode,Fariborz Jahanian2012-01-261-2/+5
| | | | | | | | 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-261-0/+2
| | | | | | unused yet. llvm-svn: 149001
* arc migrator: Provide infrastructure to add optionsFariborz Jahanian2012-01-251-0/+2
| | | | | | | | | specific to migrator. Use its first option to warn migrating from GC to arc when NSAllocateCollectable/NSReallocateCollectable is used. // rdar://10532541 llvm-svn: 148887
* Extract the (InputKind, std::string) pair used to describe inputs toDouglas Gregor2012-01-201-9/+10
| | | | | | | the front end into its own class, FrontendInputFile, to make it easier to introduce new per-input data. No functionality change. llvm-svn: 148546
* 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] In GC, transform NSMakeCollectable to CFBridgingRelease.Argyrios Kyrtzidis2011-11-041-4/+10
| | | | llvm-svn: 143698
* Further refine the diagnostic categories for ARC diagnostics. Addresses ↵Ted Kremenek2011-10-201-10/+1
| | | | | | <rdar://problem/10245086>. llvm-svn: 142571
* 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
* 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
* 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-251-20/+20
| | | | llvm-svn: 140478
* For the MacroExpands preprocessor callback, also pass the SourceRangeArgyrios Kyrtzidis2011-08-181-1/+2
| | | | | | of expansion (for function macros it includes the right paren). llvm-svn: 137909
* Fix "Uninitialized" warnings on g++-4.4.NAKAMURA Takumi2011-08-141-1/+1
| | | | | | In fact, they are false warnings but it seems g++-4.4 might be unable to know they must be false. llvm-svn: 137568
* Make helper functions static.Benjamin Kramer2011-08-021-4/+5
| | | | llvm-svn: 136679
* Move ArrayRef to LLVM.h and eliminate now-redundant qualifiers, patch by Jon ↵Chris Lattner2011-07-231-2/+2
| | | | | | Mulder! llvm-svn: 135855
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-21/+19
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* [arcmt] Add some additional driver flags to optionally emit or save the ↵Argyrios Kyrtzidis2011-07-191-6/+42
| | | | | | | | | | | pre-migration ARC errors. -arcmt-migrate-emit-errors : Emits the pre-migration ARC errors but it doesn't affect anything else -arcmt-migrate-report-output : Writes out the pre-migration ARC errors to the provided plist file rdar://9791454 llvm-svn: 135491
* [arcmt] NSInvocation's [get/set]ReturnValue and [get/set]Argument are only safeArgyrios Kyrtzidis2011-07-181-1/+1
| | | | | | with __unsafe_unretained parameters. Emit error for strong/weak ones. rdar://9206226 llvm-svn: 135381
* [arcmt] Make sure migrating to ARC works even if '-fobjc-arc' is included in ↵Argyrios Kyrtzidis2011-07-141-1/+9
| | | | | | command-line flags. rdar://9567824 llvm-svn: 135115
* [arcmt] Introduce new '-ccc-arcmt-migrate <path>' ARC migration driver option.Argyrios Kyrtzidis2011-07-091-6/+59
| | | | | | | | | | | | | | | | | | | | This is a new mode of migration, where we avoid modifying the original files but we emit temporary files instead. <path> will be used to keep migration process metadata. Currently the temporary files that are produced are put in the system's temp directory but we can put them in the <path> if is necessary. Also introduce new ARC migration functions in libclang whose only purpose, currently, is to accept <path> and provide pairs of original file/transformed file to map from the originals to the files after transformations are applied. Finally introduce the c-arcmt-test utility that exercises the new libclang functions, update arcmt-test, and add tests for the whole process. rdar://9735086. llvm-svn: 134844
* Change the driver's logic about Objective-C runtimes: abstract out aJohn McCall2011-07-061-1/+1
| | | | | | | | | | | | structure to hold inferred information, then propagate each invididual bit down to -cc1. Separate the bits of "supports weak" and "has a native ARC runtime"; make the latter a CodeGenOption. The tool chain is still driving this decision, because it's the place that has the required deployment target information on Darwin, but at least it's better-factored now. llvm-svn: 134453
* [arcmt] Make -Warc-unsafe-retained-assign an error when migrating. ↵Argyrios Kyrtzidis2011-06-221-0/+2
| | | | | | rdar://8939557 llvm-svn: 133627
* [arcmt] Find out whether there is an ARC runtime directly from the triple, ↵Argyrios Kyrtzidis2011-06-201-50/+66
| | | | | | avoid hacky delegation to the driver for that. llvm-svn: 133464
* [arcmt] Fix the ARC migrator. -arcmt-modify requires running before the ↵Argyrios Kyrtzidis2011-06-181-1/+9
| | | | | | | | initialization of SourceManager because it is going to modify the input file. llvm-svn: 133323
* [arcmt] Const'ify.Argyrios Kyrtzidis2011-06-181-4/+4
| | | | llvm-svn: 133322
* [arcmt] Remove '-arcmt-modify-in-memory', it turned out less useful than we ↵Argyrios Kyrtzidis2011-06-171-35/+0
| | | | | | hoped it would be. llvm-svn: 133315
* [arcmt] Fix tests in non-darwin.Argyrios Kyrtzidis2011-06-161-0/+5
| | | | llvm-svn: 133140
* The ARC Migration Tool. All the credit goes to Argyrios and FariborzJohn McCall2011-06-151-0/+484
for this. llvm-svn: 133104
OpenPOWER on IntegriCloud