From 30660a898545416f0fea2d717f16f75640001e38 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 6 Mar 2012 20:06:33 +0000 Subject: Add new code migrator support for migrating existing Objective-C code to use 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152141 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/arcmt-test/CMakeLists.txt | 1 + tools/arcmt-test/Makefile | 2 +- tools/arcmt-test/arcmt-test.cpp | 5 ++--- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/arcmt-test') diff --git a/tools/arcmt-test/CMakeLists.txt b/tools/arcmt-test/CMakeLists.txt index 9227f8ee63..a0029b416f 100644 --- a/tools/arcmt-test/CMakeLists.txt +++ b/tools/arcmt-test/CMakeLists.txt @@ -1,5 +1,6 @@ set(LLVM_USED_LIBS clangARCMigrate + clangEdit clangRewrite ) diff --git a/tools/arcmt-test/Makefile b/tools/arcmt-test/Makefile index c143e27f33..f5ca81a6d1 100644 --- a/tools/arcmt-test/Makefile +++ b/tools/arcmt-test/Makefile @@ -19,6 +19,6 @@ NO_INSTALL = 1 LINK_COMPONENTS := support mc USEDLIBS = clangIndex.a clangARCMigrate.a clangRewrite.a \ clangFrontend.a clangDriver.a clangSerialization.a clangParse.a \ - clangSema.a clangAnalysis.a clangAST.a clangLex.a clangBasic.a + clangSema.a clangEdit.a clangAnalysis.a clangAST.a clangLex.a clangBasic.a include $(CLANG_LEVEL)/Makefile diff --git a/tools/arcmt-test/arcmt-test.cpp b/tools/arcmt-test/arcmt-test.cpp index 881a058c2c..2dc8034e32 100644 --- a/tools/arcmt-test/arcmt-test.cpp +++ b/tools/arcmt-test/arcmt-test.cpp @@ -135,9 +135,8 @@ static bool checkForMigration(StringRef resourcesPath, } static void printResult(FileRemapper &remapper, raw_ostream &OS) { - CompilerInvocation CI; - remapper.applyMappings(CI); - PreprocessorOptions &PPOpts = CI.getPreprocessorOpts(); + PreprocessorOptions PPOpts; + remapper.applyMappings(PPOpts); // The changed files will be in memory buffers, print them. for (unsigned i = 0, e = PPOpts.RemappedFileBuffers.size(); i != e; ++i) { const llvm::MemoryBuffer *mem = PPOpts.RemappedFileBuffers[i].second; -- cgit v1.2.3