[llvm-commits] [llvm] r46166 - /llvm/trunk/include/llvm/ADT/StringExtras.h
Chris Lattner
sabre at nondot.org
Fri Jan 18 10:54:32 PST 2008
Author: lattner
Date: Fri Jan 18 12:54:31 2008
New Revision: 46166
URL: http://llvm.org/viewvc/llvm-project?rev=46166&view=rev
Log:
don't form an std::string with a null pointer, it aborts.
Modified:
llvm/trunk/include/llvm/ADT/StringExtras.h
Modified: llvm/trunk/include/llvm/ADT/StringExtras.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringExtras.h?rev=46166&r1=46165&r2=46166&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/StringExtras.h (original)
+++ llvm/trunk/include/llvm/ADT/StringExtras.h Fri Jan 18 12:54:31 2008
@@ -98,7 +98,7 @@
return ftostr(V.convertToDouble());
else if (&V.getSemantics() == &APFloat::IEEEsingle)
return ftostr((double)V.convertToFloat());
- return 0; // error
+ return "<unknown format in ftostr>"; // error
}
static inline std::string LowercaseString(const std::string &S) {
More information about the llvm-commits
mailing list