summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/StringExtras.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-18 18:54:31 +0000
committerChris Lattner <sabre@nondot.org>2008-01-18 18:54:31 +0000
commit45695534323a1e79a49eca5f8cc7423ec798244b (patch)
tree871cfcbcb8cc260af1aacdb9fc68839ecd8e8483 /include/llvm/ADT/StringExtras.h
parentef97c676f97d33312eb5009522a9d51f2c25ccb1 (diff)
downloadllvm-45695534323a1e79a49eca5f8cc7423ec798244b.tar.gz
llvm-45695534323a1e79a49eca5f8cc7423ec798244b.tar.bz2
llvm-45695534323a1e79a49eca5f8cc7423ec798244b.tar.xz
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
Diffstat (limited to 'include/llvm/ADT/StringExtras.h')
-rw-r--r--include/llvm/ADT/StringExtras.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/StringExtras.h b/include/llvm/ADT/StringExtras.h
index 20ba92a4ae..2a01c5f2d3 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 "<unknown format in ftostr>"; // error
}
static inline std::string LowercaseString(const std::string &S) {