Replace some const std::string & with llvm::StringRef or std::string
and std::move to avoid implicit std::string construction.

Patch by Eugene Kosov.

llvm-svn: 241330
diff --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp
index a309ecd..4acfe72 100644
--- a/clang-tools-extra/modularize/Modularize.cpp
+++ b/clang-tools-extra/modularize/Modularize.cpp
@@ -466,9 +466,9 @@
 public:
   DenseMap<const FileEntry *, HeaderContents> HeaderContentMismatches;
 
-  void add(const std::string &Name, enum Entry::EntryKind Kind, Location Loc) {
+  void add(StringRef Name, enum Entry::EntryKind Kind, Location Loc) {
     // Record this entity in its header.
-    HeaderEntry HE = { Name, Loc };
+    HeaderEntry HE = {Name.str(), Loc};
     CurHeaderContents[Loc.File].push_back(HE);
 
     // Check whether we've seen this entry before.