summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-04 01:39:08 +0000
committerDan Gohman <gohman@apple.com>2010-08-04 01:39:08 +0000
commitd98af0a5b86425fdc723bb54fc59247c585d63ab (patch)
tree98f430708144f58c8aa367b68883888aa4067c8b
parent2511bd06dea977b68f9254095afdb71782d7dda1 (diff)
downloadllvm-d98af0a5b86425fdc723bb54fc59247c585d63ab.tar.gz
llvm-d98af0a5b86425fdc723bb54fc59247c585d63ab.tar.bz2
llvm-d98af0a5b86425fdc723bb54fc59247c585d63ab.tar.xz
Eliminate unnecessary empty string literals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110183 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp2
-rw-r--r--lib/System/Unix/Path.inc4
-rw-r--r--lib/VMCore/Module.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
index 6cae804422..8313de5e32 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
@@ -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
}
diff --git a/lib/System/Unix/Path.inc b/lib/System/Unix/Path.inc
index bc104a32a3..3d88311b4e 100644
--- a/lib/System/Unix/Path.inc
+++ b/lib/System/Unix/Path.inc
@@ -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);
}
diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp
index 507d24936c..d7ddf96cb0 100644
--- a/lib/VMCore/Module.cpp
+++ b/lib/VMCore/Module.cpp
@@ -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 *>();