[PATCH] D31387: MachineVerifier: avoid reference to nullptr

Sven van Haastregt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 02:20:48 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL298987: [MachineVerifier] Avoid reference to nullptr (authored by svenvh).

Changed prior to commit:
  https://reviews.llvm.org/D31387?vs=93108&id=93350#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D31387

Files:
  llvm/trunk/lib/CodeGen/MachineVerifier.cpp


Index: llvm/trunk/lib/CodeGen/MachineVerifier.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/MachineVerifier.cpp
+++ llvm/trunk/lib/CodeGen/MachineVerifier.cpp
@@ -260,8 +260,8 @@
     static char ID; // Pass ID, replacement for typeid
     const std::string Banner;
 
-    MachineVerifierPass(const std::string &banner = nullptr)
-      : MachineFunctionPass(ID), Banner(banner) {
+    MachineVerifierPass(const std::string banner = std::string())
+      : MachineFunctionPass(ID), Banner(std::move(banner)) {
         initializeMachineVerifierPassPass(*PassRegistry::getPassRegistry());
       }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31387.93350.patch
Type: text/x-patch
Size: 652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170329/62880394/attachment.bin>


More information about the llvm-commits mailing list