[C++11] Replace OwningPtr::take() with OwningPtr::release().
llvm-svn: 202957
diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp
index d33db18..b0196f7 100644
--- a/llvm/utils/FileCheck/FileCheck.cpp
+++ b/llvm/utils/FileCheck/FileCheck.cpp
@@ -832,7 +832,7 @@
// If we want to canonicalize whitespace, strip excess whitespace from the
// buffer containing the CHECK lines. Remove DOS style line endings.
MemoryBuffer *F =
- CanonicalizeInputFile(File.take(), NoCanonicalizeWhiteSpace);
+ CanonicalizeInputFile(File.release(), NoCanonicalizeWhiteSpace);
SM.AddNewSourceBuffer(F, SMLoc());
@@ -1234,7 +1234,7 @@
// Remove duplicate spaces in the input file if requested.
// Remove DOS style line endings.
MemoryBuffer *F =
- CanonicalizeInputFile(File.take(), NoCanonicalizeWhiteSpace);
+ CanonicalizeInputFile(File.release(), NoCanonicalizeWhiteSpace);
SM.AddNewSourceBuffer(F, SMLoc());
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index cf4580f..e976062 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -1366,7 +1366,7 @@
StringRef(II->TheDef->getName()).endswith("_Int"))
continue;
- Matchables.push_back(II.take());
+ Matchables.push_back(II.release());
}
// Parse all of the InstAlias definitions and stick them in the list of
@@ -1390,7 +1390,7 @@
// Validate the alias definitions.
II->validate(CommentDelimiter, false);
- Matchables.push_back(II.take());
+ Matchables.push_back(II.release());
}
}
@@ -1461,7 +1461,7 @@
AliasII->formTwoOperandAlias(Constraint);
// Add the alias to the matchables list.
- NewMatchables.push_back(AliasII.take());
+ NewMatchables.push_back(AliasII.release());
}
} else
II->buildAliasResultOperands();
diff --git a/llvm/utils/TableGen/DAGISelMatcher.h b/llvm/utils/TableGen/DAGISelMatcher.h
index bf760d5..441acd5 100644
--- a/llvm/utils/TableGen/DAGISelMatcher.h
+++ b/llvm/utils/TableGen/DAGISelMatcher.h
@@ -98,7 +98,7 @@
Matcher *getNext() { return Next.get(); }
const Matcher *getNext() const { return Next.get(); }
void setNext(Matcher *C) { Next.reset(C); }
- Matcher *takeNext() { return Next.take(); }
+ Matcher *takeNext() { return Next.release(); }
OwningPtr<Matcher> &getNextPtr() { return Next; }
diff --git a/llvm/utils/TableGen/DAGISelMatcherOpt.cpp b/llvm/utils/TableGen/DAGISelMatcherOpt.cpp
index 682b27c..bde864a 100644
--- a/llvm/utils/TableGen/DAGISelMatcherOpt.cpp
+++ b/llvm/utils/TableGen/DAGISelMatcherOpt.cpp
@@ -33,7 +33,7 @@
for (unsigned i = 0, e = Scope->getNumChildren(); i != e; ++i) {
OwningPtr<Matcher> Child(Scope->takeChild(i));
ContractNodes(Child, CGP);
- Scope->resetChild(i, Child.take());
+ Scope->resetChild(i, Child.release());
}
return;
}
@@ -62,7 +62,7 @@
if (New) {
// Insert the new node.
- New->setNext(MatcherPtr.take());
+ New->setNext(MatcherPtr.release());
MatcherPtr.reset(New);
// Remove the old one.
MC->setNext(MC->getNext()->takeNext());
@@ -85,7 +85,7 @@
if (isa<EmitNodeMatcher>(N) && isa<MarkGlueResultsMatcher>(N->getNext()) &&
isa<CompleteMatchMatcher>(N->getNext()->getNext())) {
// Unlink the two nodes from the list.
- Matcher *EmitNode = MatcherPtr.take();
+ Matcher *EmitNode = MatcherPtr.release();
Matcher *MFR = EmitNode->takeNext();
Matcher *Tail = MFR->takeNext();
@@ -164,7 +164,7 @@
isa<RecordMatcher>(N)) &&
isa<CheckOpcodeMatcher>(N->getNext())) {
// Unlink the two nodes from the list.
- Matcher *CheckType = MatcherPtr.take();
+ Matcher *CheckType = MatcherPtr.release();
Matcher *CheckOpcode = CheckType->takeNext();
Matcher *Tail = CheckOpcode->takeNext();
@@ -198,7 +198,7 @@
for (unsigned i = 0, e = Scope->getNumChildren(); i != e; ++i) {
OwningPtr<Matcher> Child(Scope->takeChild(i));
SinkPatternPredicates(Child);
- Scope->resetChild(i, Child.take());
+ Scope->resetChild(i, Child.release());
}
return;
}
@@ -217,7 +217,7 @@
// Okay, we know we can sink it past at least one node. Unlink it from the
// chain and scan for the new insertion point.
- MatcherPtr.take(); // Don't delete CPPM.
+ MatcherPtr.release(); // Don't delete CPPM.
MatcherPtr.reset(CPPM->takeNext());
N = MatcherPtr.get();
@@ -272,7 +272,7 @@
OwningPtr<Matcher> Child(Scope->takeChild(i));
FactorNodes(Child);
- if (Matcher *N = Child.take())
+ if (Matcher *N = Child.release())
OptionsToMatch.push_back(N);
}
@@ -516,5 +516,5 @@
ContractNodes(MatcherPtr, CGP);
SinkPatternPredicates(MatcherPtr);
FactorNodes(MatcherPtr);
- return MatcherPtr.take();
+ return MatcherPtr.release();
}