summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/cpp11-migrate/LoopConvert/LoopActions.cpp
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-08-30 22:09:03 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-08-30 22:09:03 +0000
commit92d9cb4dd1fcf633e264cbacbcdcd1b5c6f10714 (patch)
treeaba42a41d482498dd4f83c88fb5c1b1aebea25ab /clang-tools-extra/cpp11-migrate/LoopConvert/LoopActions.cpp
parent79917a913e20d964708e89a721197febc60e8391 (diff)
downloadbcm5719-llvm-92d9cb4dd1fcf633e264cbacbcdcd1b5c6f10714.tar.gz
bcm5719-llvm-92d9cb4dd1fcf633e264cbacbcdcd1b5c6f10714.zip
Revert "cpp11-migrate: Fixing autoconf build after adding libclangReplace dependency"
Revert "cpp11-migrate: Refactor for driver model of operation" This reverts commit r189691. This reverts commit r189689. This was breaking the phase 1 OS X build for ~2 hours. https://smooshbase.apple.com/buildbot-internal/builders/phase1%20-%20sanity/builds/9559 I reverted the latter commit since I think the latter depended on the former. llvm-svn: 189700
Diffstat (limited to 'clang-tools-extra/cpp11-migrate/LoopConvert/LoopActions.cpp')
-rw-r--r--clang-tools-extra/cpp11-migrate/LoopConvert/LoopActions.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/clang-tools-extra/cpp11-migrate/LoopConvert/LoopActions.cpp b/clang-tools-extra/cpp11-migrate/LoopConvert/LoopActions.cpp
index 0ba49d8ad4f..da9d7b56557 100644
--- a/clang-tools-extra/cpp11-migrate/LoopConvert/LoopActions.cpp
+++ b/clang-tools-extra/cpp11-migrate/LoopConvert/LoopActions.cpp
@@ -815,9 +815,9 @@ void LoopFixer::doConversion(ASTContext *Context,
// the declaration of the alias variable. This is probably a bug.
ReplacementText = ";";
- Owner.addReplacementForCurrentTU(Replacement(
- Context->getSourceManager(),
- CharSourceRange::getTokenRange(ReplaceRange), ReplacementText));
+ Replace->insert(Replacement(Context->getSourceManager(),
+ CharSourceRange::getTokenRange(ReplaceRange),
+ ReplacementText));
// No further replacements are made to the loop, since the iterator or index
// was used exactly once - in the initialization of AliasVar.
} else {
@@ -830,9 +830,10 @@ void LoopFixer::doConversion(ASTContext *Context,
I != E; ++I) {
std::string ReplaceText = I->IsArrow ? VarName + "." : VarName;
ReplacedVarRanges->insert(std::make_pair(TheLoop, IndexVar));
- Owner.addReplacementForCurrentTU(
+ Replace->insert(
Replacement(Context->getSourceManager(),
- CharSourceRange::getTokenRange(I->Range), ReplaceText));
+ CharSourceRange::getTokenRange(I->Range),
+ ReplaceText));
}
}
@@ -861,9 +862,9 @@ void LoopFixer::doConversion(ASTContext *Context,
std::string TypeString = AutoRefType.getAsString();
std::string Range = ("(" + TypeString + " " + VarName + " : "
+ MaybeDereference + ContainerString + ")").str();
- Owner.addReplacementForCurrentTU(
- Replacement(Context->getSourceManager(),
- CharSourceRange::getTokenRange(ParenRange), Range));
+ Replace->insert(Replacement(Context->getSourceManager(),
+ CharSourceRange::getTokenRange(ParenRange),
+ Range));
GeneratedDecls->insert(make_pair(TheLoop, VarName));
}
OpenPOWER on IntegriCloud