summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/cpp11-migrate/LoopConvert/LoopConvert.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/cpp11-migrate/LoopConvert/LoopConvert.cpp')
-rw-r--r--clang-tools-extra/cpp11-migrate/LoopConvert/LoopConvert.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/clang-tools-extra/cpp11-migrate/LoopConvert/LoopConvert.cpp b/clang-tools-extra/cpp11-migrate/LoopConvert/LoopConvert.cpp
index 38659f854fa..355dfa362e1 100644
--- a/clang-tools-extra/cpp11-migrate/LoopConvert/LoopConvert.cpp
+++ b/clang-tools-extra/cpp11-migrate/LoopConvert/LoopConvert.cpp
@@ -31,12 +31,6 @@ int LoopConvertTransform::apply(const FileContentsByPath &InputStates,
FileContentsByPath &ResultStates) {
RefactoringTool LoopTool(Database, SourcePaths);
- for (FileContentsByPath::const_iterator I = InputStates.begin(),
- E = InputStates.end();
- I != E; ++I) {
- LoopTool.mapVirtualFile(I->first, I->second);
- }
-
StmtAncestorASTVisitor ParentFinder;
StmtGeneratedVarNameMap GeneratedDecls;
ReplacedVarsMap ReplacedVars;
@@ -63,8 +57,7 @@ int LoopConvertTransform::apply(const FileContentsByPath &InputStates,
Options().MaxRiskLevel, LFK_PseudoArray);
Finder.addMatcher(makePseudoArrayLoopMatcher(), &PseudoarrrayLoopFixer);
- if (int result = LoopTool.run(
- newFrontendActionFactory(&Finder, /*Callbacks=*/ this))) {
+ if (int result = LoopTool.run(createActionFactory(Finder, InputStates))) {
llvm::errs() << "Error encountered during translation.\n";
return result;
}
OpenPOWER on IntegriCloud