summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2007-11-02 15:10:05 +0000
committerNeil Booth <neil@daikokuya.co.uk>2007-11-02 15:10:05 +0000
commit758d0fd73601e4b9b3d95c03b5dca443c445bffb (patch)
treea41bb0f87e0c4655c7a11db8b787d4dd15fb3820 /llvm/lib/Support
parent74f87df10824c70a6d31a0fa9f51f22db448a39e (diff)
downloadbcm5719-llvm-758d0fd73601e4b9b3d95c03b5dca443c445bffb.tar.gz
bcm5719-llvm-758d0fd73601e4b9b3d95c03b5dca443c445bffb.zip
Remove some unnecessary C-style statics.
Restore an assertion that arithmetic can be performed on this format. llvm-svn: 43638
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/APFloat.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp
index 88d158ae13a..c724f9b9628 100644
--- a/llvm/lib/Support/APFloat.cpp
+++ b/llvm/lib/Support/APFloat.cpp
@@ -121,7 +121,7 @@ namespace {
If the exponent overflows, returns a large exponent with the
appropriate sign. */
- static int
+ int
readExponent(const char *p)
{
bool isNegative;
@@ -159,7 +159,7 @@ namespace {
/* This is ugly and needs cleaning up, but I don't immediately see
how whilst remaining safe. */
- static int
+ int
totalExponent(const char *p, int exponentAdjustment)
{
integerPart unsignedExponent;
@@ -433,7 +433,7 @@ namespace {
/* Place pow(5, power) in DST, and return the number of parts used.
DST must be at least one part larger than size of the answer. */
- static unsigned int
+ unsigned int
powerOf5(integerPart *dst, unsigned int power)
{
static integerPart firstEightPowers[] = { 1, 5, 25, 125, 625, 3125,
@@ -504,7 +504,7 @@ namespace {
/* Write out an integerPart in hexadecimal, starting with the most
significant nibble. Write out exactly COUNT hexdigits, return
COUNT. */
- static unsigned int
+ unsigned int
partAsHex (char *dst, integerPart part, unsigned int count,
const char *hexDigitChars)
{
@@ -522,7 +522,7 @@ namespace {
}
/* Write out an unsigned decimal integer. */
- static char *
+ char *
writeUnsignedDecimal (char *dst, unsigned int n)
{
char buff[40], *p;
@@ -540,7 +540,7 @@ namespace {
}
/* Write out a signed decimal integer. */
- static char *
+ char *
writeSignedDecimal (char *dst, int value)
{
if (value < 0) {
@@ -1750,6 +1750,8 @@ APFloat::convertToSignExtendedInteger(integerPart *parts, unsigned int width,
const integerPart *src;
unsigned int dstPartsCount, truncatedBits;
+ assertArithmeticOK(*semantics);
+
/* Handle the three special cases first. */
if(category == fcInfinity || category == fcNaN)
return opInvalidOp;
OpenPOWER on IntegriCloud