summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/Refactoring/AtomicChange.cpp
diff options
context:
space:
mode:
authorEric Liu <ioeric@google.com>2017-03-08 15:53:10 +0000
committerEric Liu <ioeric@google.com>2017-03-08 15:53:10 +0000
commit373c182a07144eb1153f02c7378398f32ae6a30a (patch)
treeed3a50ea6554f8562cf2a3beec33040430a8dd7d /clang/lib/Tooling/Refactoring/AtomicChange.cpp
parent1b7197e690a7055a0992bae76e996f0b04d52a61 (diff)
downloadbcm5719-llvm-373c182a07144eb1153f02c7378398f32ae6a30a.tar.gz
bcm5719-llvm-373c182a07144eb1153f02c7378398f32ae6a30a.zip
Add missing implementation for AtomicChange::replace(...)
Summary: Just realized the implementation is missing... Reviewers: klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30735 llvm-svn: 297289
Diffstat (limited to 'clang/lib/Tooling/Refactoring/AtomicChange.cpp')
-rw-r--r--clang/lib/Tooling/Refactoring/AtomicChange.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Tooling/Refactoring/AtomicChange.cpp b/clang/lib/Tooling/Refactoring/AtomicChange.cpp
index 3572d2a1bea..02c55100ffb 100644
--- a/clang/lib/Tooling/Refactoring/AtomicChange.cpp
+++ b/clang/lib/Tooling/Refactoring/AtomicChange.cpp
@@ -132,6 +132,11 @@ AtomicChange AtomicChange::convertFromYAML(llvm::StringRef YAMLContent) {
return E;
}
+llvm::Error AtomicChange::replace(const SourceManager &SM, SourceLocation Loc,
+ unsigned Length, llvm::StringRef Text) {
+ return Replaces.add(Replacement(SM, Loc, Length, Text));
+}
+
llvm::Error AtomicChange::insert(const SourceManager &SM, SourceLocation Loc,
llvm::StringRef Text, bool InsertAfter) {
if (Text.empty())
OpenPOWER on IntegriCloud