Eliminate unnecessary empty string literals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110183 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2010-08-04 01:39:08 +00:00
parent 2511bd06de
commit d98af0a5b8
3 changed files with 4 additions and 4 deletions

View 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
}

View 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);
}

View 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 *>();