summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/APFloat.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-20 17:12:33 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-20 17:12:33 +0000
commitbf5998edfba636d37b380c3c58049192b450154f (patch)
tree9be0169ff1e182695d10b2794b48538617bf7948 /llvm/lib/Support/APFloat.cpp
parent16f5415f5b843a43c5cafc66111c1941ae34d083 (diff)
downloadbcm5719-llvm-bf5998edfba636d37b380c3c58049192b450154f.tar.gz
bcm5719-llvm-bf5998edfba636d37b380c3c58049192b450154f.zip
Fix two APFloat bugs in converting hexadecimal constants.
llvm-svn: 79540
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
-rw-r--r--llvm/lib/Support/APFloat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp
index d15a21b4ff7..c13231d3fe1 100644
--- a/llvm/lib/Support/APFloat.cpp
+++ b/llvm/lib/Support/APFloat.cpp
@@ -2153,7 +2153,7 @@ APFloat::convertFromHexadecimalString(const StringRef &s,
integerPart hex_value;
if(*p == '.') {
- assert(dot == 0);
+ assert(dot == s.end());
dot = p++;
}
@@ -2190,7 +2190,7 @@ APFloat::convertFromHexadecimalString(const StringRef &s,
int expAdjustment;
/* Implicit hexadecimal point? */
- if(!dot)
+ if (dot == s.end())
dot = p;
/* Calculate the exponent adjustment implicit in the number of
OpenPOWER on IntegriCloud