From: Chris Lattner Date: Fri, 18 Jan 2008 18:54:31 +0000 (+0000) Subject: don't form an std::string with a null pointer, it aborts. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=45695534323a1e79a49eca5f8cc7423ec798244b;p=oota-llvm.git don't form an std::string with a null pointer, it aborts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46166 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/StringExtras.h b/include/llvm/ADT/StringExtras.h index 20ba92a4aeb..2a01c5f2d34 100644 --- a/include/llvm/ADT/StringExtras.h +++ b/include/llvm/ADT/StringExtras.h @@ -98,7 +98,7 @@ static inline std::string ftostr(const APFloat& V) { return ftostr(V.convertToDouble()); else if (&V.getSemantics() == &APFloat::IEEEsingle) return ftostr((double)V.convertToFloat()); - return 0; // error + return ""; // error } static inline std::string LowercaseString(const std::string &S) {