Avoid double-copy of NameMapper object.
authorDavid Neto <dneto@google.com>
Thu, 11 Aug 2016 16:11:36 +0000 (12:11 -0400)
committerDavid Neto <dneto@google.com>
Thu, 11 Aug 2016 16:11:36 +0000 (12:11 -0400)
tools/cfg/bin_to_dot.cpp

index 841d1f7..64ac14d 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <cassert>
 #include <iostream>
+#include <utility>
 #include <vector>
 
 #include "assembly_grammar.h"
@@ -43,7 +44,7 @@ const char* kContinueStyle = "style=dotted";
 class DotConverter {
  public:
   DotConverter(libspirv::NameMapper name_mapper, std::iostream* out)
-      : name_mapper_(name_mapper), out_(*out) {}
+      : name_mapper_(std::move(name_mapper)), out_(*out) {}
 
   // Emits the graph preamble.
   void Begin() const {