Remove uses of the redundant ".reset(nullptr)" of unique_ptr, in favor of ".reset()"
authorDavid Blaikie <dblaikie@gmail.com>
Sat, 19 Jul 2014 01:05:11 +0000 (01:05 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Sat, 19 Jul 2014 01:05:11 +0000 (01:05 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213438 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/IPA/CallGraph.cpp
lib/CodeGen/RegAllocBasic.cpp
lib/CodeGen/RegAllocGreedy.cpp
lib/Support/FileOutputBuffer.cpp
utils/TableGen/DAGISelMatcherOpt.cpp

index caec2534691afa4d7e69f773419e5365e92cedf9..dfabb0ad063d3a61596961d7d0f385b6b4847da9 100644 (file)
@@ -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) {
index b722098c5c7595a0ff11fbac173593afe2a04473..6bc678e8521190bed76f37429a18c5215abdbe42 100644 (file)
@@ -157,7 +157,7 @@ void RABasic::getAnalysisUsage(AnalysisUsage &AU) const {
 }
 
 void RABasic::releaseMemory() {
-  SpillerInstance.reset(nullptr);
+  SpillerInstance.reset();
 }
 
 
index 901b993eea80a93f6e06dfb47c4eea0e97ad9f87..dee990c2eb5f81b6c894e46c6eb2e43fa7ebd43d 100644 (file)
@@ -486,7 +486,7 @@ void RAGreedy::LRE_DidCloneVirtReg(unsigned New, unsigned Old) {
 }
 
 void RAGreedy::releaseMemory() {
-  SpillerInstance.reset(nullptr);
+  SpillerInstance.reset();
   ExtraRegInfo.clear();
   GlobalCand.clear();
 }
index 2e740ca04518dd4bb57e9cb17077b324a7316335..94bcdc58a8062d2c2a9179a3a6811044b40fa3bf 100644 (file)
@@ -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 ) {
index 0b117eb37c9cd55378e2df273dbb07e529586684..da6a9577a7707110700eca20af25706ec261f76e 100644 (file)
@@ -400,7 +400,7 @@ static void FactorNodes(std::unique_ptr<Matcher> &MatcherPtr) {
   }
   
   if (NewOptionsToMatch.empty()) {
-    MatcherPtr.reset(nullptr);
+    MatcherPtr.reset();
     return;
   }