[llvm-commits] CVS: llvm/utils/fpcmp/fpcmp.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Apr 13 16:49:06 PDT 2004
Changes in directory llvm/utils/fpcmp:
fpcmp.cpp updated: 1.1 -> 1.2
---
Log message:
Fix bug, add support for +/-
---
Diffs of the changes: (+2 -2)
Index: llvm/utils/fpcmp/fpcmp.cpp
diff -u llvm/utils/fpcmp/fpcmp.cpp:1.1 llvm/utils/fpcmp/fpcmp.cpp:1.2
--- llvm/utils/fpcmp/fpcmp.cpp:1.1 Tue Apr 13 15:55:49 2004
+++ llvm/utils/fpcmp/fpcmp.cpp Tue Apr 13 16:48:43 2004
@@ -56,7 +56,7 @@
switch (C) {
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
- case '.':
+ case '.': case '+': case '-':
case 'e':
case 'E': return true;
default: return false;
@@ -64,7 +64,7 @@
}
static char *BackupNumber(char *Pos, char *FirstChar) {
- while (Pos < FirstChar && isNumberChar(Pos[-1]))
+ while (Pos > FirstChar && isNumberChar(Pos[-1]))
--Pos;
return Pos;
}
More information about the llvm-commits
mailing list