[llvm-commits] [llvm] r110183 - in /llvm/trunk/lib: CodeGen/SelectionDAG/SelectionDAGPrinter.cpp System/Unix/Path.inc VMCore/Module.cpp
Dan Gohman
gohman at apple.com
Tue Aug 3 18:39:08 PDT 2010
Author: djg
Date: Tue Aug 3 20:39:08 2010
New Revision: 110183
URL: http://llvm.org/viewvc/llvm-project?rev=110183&view=rev
Log:
Eliminate unnecessary empty string literals.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
llvm/trunk/lib/System/Unix/Path.inc
llvm/trunk/lib/VMCore/Module.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp?rev=110183&r1=110182&r2=110183&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp Tue Aug 3 20:39:08 2010
@@ -199,7 +199,7 @@
#else
errs() << "SelectionDAG::getGraphAttrs is only available in debug builds"
<< " on systems with Graphviz or gv!\n";
- return std::string("");
+ return std::string();
#endif
}
Modified: llvm/trunk/lib/System/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Path.inc?rev=110183&r1=110182&r2=110183&view=diff
==============================================================================
--- llvm/trunk/lib/System/Unix/Path.inc (original)
+++ llvm/trunk/lib/System/Unix/Path.inc Tue Aug 3 20:39:08 2010
@@ -276,7 +276,7 @@
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 @@
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);
}
Modified: llvm/trunk/lib/VMCore/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Module.cpp?rev=110183&r1=110182&r2=110183&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Module.cpp (original)
+++ llvm/trunk/lib/VMCore/Module.cpp Tue Aug 3 20:39:08 2010
@@ -58,7 +58,7 @@
//
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 *>();
More information about the llvm-commits
mailing list