[cfe-commits] r133315 - in /cfe/trunk: include/clang/ARCMigrate/ARCMT.h include/clang/ARCMigrate/ARCMTActions.h include/clang/Driver/CC1Options.td include/clang/Driver/Options.td include/clang/Frontend/FrontendOptions.h lib/ARCMigrate/ARCMT.cpp lib/ARCMigrate/ARCMTActions.cpp lib/Driver/Tools.cpp lib/Frontend/CompilerInvocation.cpp lib/FrontendTool/ExecuteCompilerInvocation.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Fri Jun 17 16:49:31 PDT 2011
Author: akirtzidis
Date: Fri Jun 17 18:49:31 2011
New Revision: 133315
URL: http://llvm.org/viewvc/llvm-project?rev=133315&view=rev
Log:
[arcmt] Remove '-arcmt-modify-in-memory', it turned out less useful than we hoped it would be.
Modified:
cfe/trunk/include/clang/ARCMigrate/ARCMT.h
cfe/trunk/include/clang/ARCMigrate/ARCMTActions.h
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/include/clang/Frontend/FrontendOptions.h
cfe/trunk/lib/ARCMigrate/ARCMT.cpp
cfe/trunk/lib/ARCMigrate/ARCMTActions.cpp
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp
Modified: cfe/trunk/include/clang/ARCMigrate/ARCMT.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/ARCMigrate/ARCMT.h?rev=133315&r1=133314&r2=133315&view=diff
==============================================================================
--- cfe/trunk/include/clang/ARCMigrate/ARCMT.h (original)
+++ cfe/trunk/include/clang/ARCMigrate/ARCMT.h Fri Jun 17 18:49:31 2011
@@ -41,12 +41,6 @@
llvm::StringRef Filename, InputKind Kind,
DiagnosticClient *DiagClient);
-/// \brief Like applyTransformations but no source file is modified, compilation
-/// happens using in-memory buffers.
-bool applyTransformationsInMemory(CompilerInvocation &origCI,
- llvm::StringRef Filename, InputKind Kind,
- DiagnosticClient *DiagClient);
-
typedef void (*TransformFn)(MigrationPass &pass);
std::vector<TransformFn> getAllTransformations();
Modified: cfe/trunk/include/clang/ARCMigrate/ARCMTActions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/ARCMigrate/ARCMTActions.h?rev=133315&r1=133314&r2=133315&view=diff
==============================================================================
--- cfe/trunk/include/clang/ARCMigrate/ARCMTActions.h (original)
+++ cfe/trunk/include/clang/ARCMigrate/ARCMTActions.h Fri Jun 17 18:49:31 2011
@@ -32,14 +32,6 @@
TransformationAction(FrontendAction *WrappedAction);
};
-class InMemoryTransformationAction : public WrapperFrontendAction {
-protected:
- virtual void ExecuteAction();
-
-public:
- InMemoryTransformationAction(FrontendAction *WrappedAction);
-};
-
}
}
Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=133315&r1=133314&r2=133315&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Fri Jun 17 18:49:31 2011
@@ -387,8 +387,6 @@
HelpText<"Check for ARC migration issues that need manual handling">;
def arcmt_modify : Flag<"-arcmt-modify">,
HelpText<"Apply modifications to files to conform to ARC">;
-def arcmt_modify_in_memory : Flag<"-arcmt-modify-in-memory">,
- HelpText<"Apply ARC conforming modifications & compile using memory buffers">;
def import_module : Separate<"-import-module">,
HelpText<"Import a module definition file">;
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=133315&r1=133314&r2=133315&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Fri Jun 17 18:49:31 2011
@@ -116,8 +116,6 @@
HelpText<"Check for ARC migration issues that need manual handling">;
def ccc_arrmt_modify : Flag<"-ccc-arrmt-modify">, CCCDriverOpt,
HelpText<"Apply modifications to files to conform to ARC">;
-def ccc_arrmt_modify_in_memory : Flag<"-ccc-arrmt-modify-in-memory">,
- HelpText<"Apply ARC conforming modifications & compile using memory buffers">;
// Make sure all other -ccc- options are rejected.
def ccc_ : Joined<"-ccc-">, Group<ccc_Group>, Flags<[Unsupported]>;
Modified: cfe/trunk/include/clang/Frontend/FrontendOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/FrontendOptions.h?rev=133315&r1=133314&r2=133315&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/FrontendOptions.h (original)
+++ cfe/trunk/include/clang/Frontend/FrontendOptions.h Fri Jun 17 18:49:31 2011
@@ -80,8 +80,7 @@
enum {
ARCMT_None,
ARCMT_Check,
- ARCMT_Modify,
- ARCMT_ModifyInMemory
+ ARCMT_Modify
} ARCMTAction;
/// The input files and their types.
Modified: cfe/trunk/lib/ARCMigrate/ARCMT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ARCMT.cpp?rev=133315&r1=133314&r2=133315&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ARCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ARCMT.cpp Fri Jun 17 18:49:31 2011
@@ -277,41 +277,6 @@
}
//===----------------------------------------------------------------------===//
-// applyTransformationsInMemory.
-//===----------------------------------------------------------------------===//
-
-bool arcmt::applyTransformationsInMemory(CompilerInvocation &origCI,
- llvm::StringRef Filename, InputKind Kind,
- DiagnosticClient *DiagClient) {
- if (!origCI.getLangOpts().ObjC1)
- return false;
-
- // Make sure checking is successful first.
- CompilerInvocation CInvokForCheck(origCI);
- if (arcmt::checkForManualIssues(CInvokForCheck, Filename, Kind, DiagClient))
- return true;
-
- CompilerInvocation CInvok(origCI);
- CInvok.getFrontendOpts().Inputs.clear();
- CInvok.getFrontendOpts().Inputs.push_back(std::make_pair(Kind, Filename));
-
- MigrationProcess migration(CInvok, DiagClient);
-
- std::vector<TransformFn> transforms = arcmt::getAllTransformations();
- assert(!transforms.empty());
-
- for (unsigned i=0, e = transforms.size(); i != e; ++i) {
- bool err = migration.applyTransform(transforms[i]);
- if (err) return true;
- }
-
- origCI.getLangOpts().ObjCAutoRefCount = true;
- migration.getRemapper().transferMappingsAndClear(origCI);
-
- return false;
-}
-
-//===----------------------------------------------------------------------===//
// CollectTransformActions.
//===----------------------------------------------------------------------===//
Modified: cfe/trunk/lib/ARCMigrate/ARCMTActions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ARCMTActions.cpp?rev=133315&r1=133314&r2=133315&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ARCMTActions.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ARCMTActions.cpp Fri Jun 17 18:49:31 2011
@@ -41,18 +41,3 @@
TransformationAction::TransformationAction(FrontendAction *WrappedAction)
: WrapperFrontendAction(WrappedAction) {}
-
-void InMemoryTransformationAction::ExecuteAction() {
- CompilerInstance &CI = getCompilerInstance();
- if (arcmt::applyTransformationsInMemory(CI.getInvocation(), getCurrentFile(),
- getCurrentFileKind(),
- CI.getDiagnostics().getClient()))
- return;
-
- WrapperFrontendAction::ExecuteAction();
-}
-
-InMemoryTransformationAction::InMemoryTransformationAction(
- FrontendAction *WrappedAction)
- : WrapperFrontendAction(WrappedAction) {}
-
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=133315&r1=133314&r2=133315&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Jun 17 18:49:31 2011
@@ -1391,8 +1391,7 @@
if (!Args.hasArg(options::OPT_fno_objc_arc)) {
if (const Arg *A = Args.getLastArg(options::OPT_ccc_arrmt_check,
- options::OPT_ccc_arrmt_modify,
- options::OPT_ccc_arrmt_modify_in_memory)) {
+ options::OPT_ccc_arrmt_modify)) {
switch (A->getOption().getID()) {
default:
llvm_unreachable("missed a case");
@@ -1402,9 +1401,6 @@
case options::OPT_ccc_arrmt_modify:
CmdArgs.push_back("-arcmt-modify");
break;
- case options::OPT_ccc_arrmt_modify_in_memory:
- CmdArgs.push_back("-arcmt-modify-in-memory");
- break;
}
}
}
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=133315&r1=133314&r2=133315&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Fri Jun 17 18:49:31 2011
@@ -424,9 +424,6 @@
case FrontendOptions::ARCMT_Modify:
Res.push_back("-arcmt-modify");
break;
- case FrontendOptions::ARCMT_ModifyInMemory:
- Res.push_back("-arcmt-modify-in-memory");
- break;
}
bool NeedLang = false;
@@ -1242,8 +1239,7 @@
Opts.ARCMTAction = FrontendOptions::ARCMT_None;
if (const Arg *A = Args.getLastArg(OPT_arcmt_check,
- OPT_arcmt_modify,
- OPT_arcmt_modify_in_memory)) {
+ OPT_arcmt_modify)) {
switch (A->getOption().getID()) {
default:
llvm_unreachable("missed a case");
@@ -1253,9 +1249,6 @@
case OPT_arcmt_modify:
Opts.ARCMTAction = FrontendOptions::ARCMT_Modify;
break;
- case OPT_arcmt_modify_in_memory:
- Opts.ARCMTAction = FrontendOptions::ARCMT_ModifyInMemory;
- break;
}
}
Modified: cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp?rev=133315&r1=133314&r2=133315&view=diff
==============================================================================
--- cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp (original)
+++ cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp Fri Jun 17 18:49:31 2011
@@ -100,9 +100,6 @@
case FrontendOptions::ARCMT_Modify:
Act = new arcmt::TransformationAction(Act);
break;
- case FrontendOptions::ARCMT_ModifyInMemory:
- Act = new arcmt::InMemoryTransformationAction(Act);
- break;
}
// If there are any AST files to merge, create a frontend action
More information about the cfe-commits
mailing list