forked from OSchip/llvm-project
Remove uses of the redundant ".reset(nullptr)" of unique_ptr, in favor of ".reset()"
It's also possible to just write "= nullptr", but there's some question of whether that's as readable, so I leave it up to authors to pick which they prefer for now. If we want to discuss standardizing on one or the other, we can do that at some point in the future. llvm-svn: 213438
This commit is contained in:
parent
b530bc0242
commit
b61064ed39
|
@ -267,7 +267,7 @@ INITIALIZE_PASS(CallGraphWrapperPass, "basiccg", "CallGraph Construction",
|
|||
|
||||
char CallGraphWrapperPass::ID = 0;
|
||||
|
||||
void CallGraphWrapperPass::releaseMemory() { G.reset(nullptr); }
|
||||
void CallGraphWrapperPass::releaseMemory() { G.reset(); }
|
||||
|
||||
void CallGraphWrapperPass::print(raw_ostream &OS, const Module *) const {
|
||||
if (!G) {
|
||||
|
|
|
@ -157,7 +157,7 @@ void RABasic::getAnalysisUsage(AnalysisUsage &AU) const {
|
|||
}
|
||||
|
||||
void RABasic::releaseMemory() {
|
||||
SpillerInstance.reset(nullptr);
|
||||
SpillerInstance.reset();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -486,7 +486,7 @@ void RAGreedy::LRE_DidCloneVirtReg(unsigned New, unsigned Old) {
|
|||
}
|
||||
|
||||
void RAGreedy::releaseMemory() {
|
||||
SpillerInstance.reset(nullptr);
|
||||
SpillerInstance.reset();
|
||||
ExtraRegInfo.clear();
|
||||
GlobalCand.clear();
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ FileOutputBuffer::create(StringRef FilePath, size_t Size,
|
|||
|
||||
std::error_code FileOutputBuffer::commit(int64_t NewSmallerSize) {
|
||||
// Unmap buffer, letting OS flush dirty pages to file on disk.
|
||||
Region.reset(nullptr);
|
||||
Region.reset();
|
||||
|
||||
// If requested, resize file as part of commit.
|
||||
if ( NewSmallerSize != -1 ) {
|
||||
|
|
|
@ -400,7 +400,7 @@ static void FactorNodes(std::unique_ptr<Matcher> &MatcherPtr) {
|
|||
}
|
||||
|
||||
if (NewOptionsToMatch.empty()) {
|
||||
MatcherPtr.reset(nullptr);
|
||||
MatcherPtr.reset();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue