Eliminate unnecessary empty string literals.
authorDan Gohman <gohman@apple.com>
Wed, 4 Aug 2010 01:39:08 +0000 (01:39 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 4 Aug 2010 01:39:08 +0000 (01:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110183 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
lib/System/Unix/Path.inc
lib/VMCore/Module.cpp

index 6cae804422ce649f5c58dfc93741cfefdf59ad93..8313de5e32bbafa4287f3786a3541d18c7224b21 100644 (file)
@@ -199,7 +199,7 @@ const std::string SelectionDAG::getGraphAttrs(const SDNode *N) const {
 #else
   errs() << "SelectionDAG::getGraphAttrs is only available in debug builds"
          << " on systems with Graphviz or gv!\n";
-  return std::string("");
+  return std::string();
 #endif
 }
 
index bc104a32a3aea32ce6f9e86fe3afb2db73f8a3ae..3d88311b4e7ab66eb3460a7f819cd1524ef88918 100644 (file)
@@ -276,7 +276,7 @@ Path::GetCurrentDirectory() {
   char pathname[MAXPATHLEN];
   if (!getcwd(pathname,MAXPATHLEN)) {
     assert (false && "Could not query current working directory.");
-    return Path("");
+    return Path();
   }
 
   return Path(pathname);
@@ -408,7 +408,7 @@ Path::getSuffix() const {
 
   std::string::size_type dot = path.rfind('.');
   if (dot == std::string::npos || dot < slash)
-    return StringRef("");
+    return StringRef();
   else
     return StringRef(path).substr(dot + 1);
 }
index 507d24936cce1b2837328ae51479d8d31502a4a3..d7ddf96cb0700c3ae3764396beeddbf4da3790c1 100644 (file)
@@ -58,7 +58,7 @@ template class llvm::SymbolTableListTraits<GlobalAlias, Module>;
 //
 
 Module::Module(StringRef MID, LLVMContext& C)
-  : Context(C), Materializer(NULL), ModuleID(MID), DataLayout("")  {
+  : Context(C), Materializer(NULL), ModuleID(MID) {
   ValSymTab = new ValueSymbolTable();
   TypeSymTab = new TypeSymbolTable();
   NamedMDSymTab = new StringMap<NamedMDNode *>();