From 6d4ee152fffbc550f885cfe98d7044b7bffbca5c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 18 Jan 2008 18:54:31 +0000 Subject: [PATCH] don't form an std::string with a null pointer, it aborts. llvm-svn: 46166 --- llvm/include/llvm/ADT/StringExtras.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/include/llvm/ADT/StringExtras.h b/llvm/include/llvm/ADT/StringExtras.h index 20ba92a4aeb1..2a01c5f2d34e 100644 --- a/llvm/include/llvm/ADT/StringExtras.h +++ b/llvm/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) {