aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Support/APFloat.cpp36
-rw-r--r--lib/Support/APInt.cpp10
-rw-r--r--lib/System/Unix/Signals.inc24
-rw-r--r--lib/VMCore/LeakDetector.cpp10
4 files changed, 40 insertions, 40 deletions
diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp
index 3b448208..8ecfa35 100644
--- a/lib/Support/APFloat.cpp
+++ b/lib/Support/APFloat.cpp
@@ -78,20 +78,20 @@ namespace llvm {
/* Put a bunch of private, handy routines in an anonymous namespace. */
namespace {
- inline unsigned int
+ static inline unsigned int
partCountForBits(unsigned int bits)
{
return ((bits) + integerPartWidth - 1) / integerPartWidth;
}
/* Returns 0U-9U. Return values >= 10U are not digits. */
- inline unsigned int
+ static inline unsigned int
decDigitValue(unsigned int c)
{
return c - '0';
}
- unsigned int
+ static unsigned int
hexDigitValue(unsigned int c)
{
unsigned int r;
@@ -111,7 +111,7 @@ namespace {
return -1U;
}
- inline void
+ static inline void
assertArithmeticOK(const llvm::fltSemantics &semantics) {
assert(semantics.arithmeticOK
&& "Compile-time arithmetic does not support these semantics");
@@ -122,7 +122,7 @@ namespace {
If the exponent overflows, returns a large exponent with the
appropriate sign. */
- int
+ static int
readExponent(const char *p)
{
bool isNegative;
@@ -160,7 +160,7 @@ namespace {
/* This is ugly and needs cleaning up, but I don't immediately see
how whilst remaining safe. */
- int
+ static int
totalExponent(const char *p, int exponentAdjustment)
{
integerPart unsignedExponent;
@@ -206,7 +206,7 @@ namespace {
return exponent;
}
- const char *
+ static const char *
skipLeadingZeroesAndAnyDot(const char *p, const char **dot)
{
*dot = 0;
@@ -242,7 +242,7 @@ namespace {
int normalizedExponent;
};
- void
+ static void
interpretDecimal(const char *p, decimalInfo *D)
{
const char *dot;
@@ -291,7 +291,7 @@ namespace {
/* Return the trailing fraction of a hexadecimal number.
DIGITVALUE is the first hex digit of the fraction, P points to
the next digit. */
- lostFraction
+ static lostFraction
trailingHexadecimalFraction(const char *p, unsigned int digitValue)
{
unsigned int hexDigit;
@@ -319,7 +319,7 @@ namespace {
/* Return the fraction lost were a bignum truncated losing the least
significant BITS bits. */
- lostFraction
+ static lostFraction
lostFractionThroughTruncation(const integerPart *parts,
unsigned int partCount,
unsigned int bits)
@@ -341,7 +341,7 @@ namespace {
}
/* Shift DST right BITS bits noting lost fraction. */
- lostFraction
+ static lostFraction
shiftRight(integerPart *dst, unsigned int parts, unsigned int bits)
{
lostFraction lost_fraction;
@@ -354,7 +354,7 @@ namespace {
}
/* Combine the effect of two lost fractions. */
- lostFraction
+ static lostFraction
combineLostFractions(lostFraction moreSignificant,
lostFraction lessSignificant)
{
@@ -375,7 +375,7 @@ namespace {
See "How to Read Floating Point Numbers Accurately" by William D
Clinger. */
- unsigned int
+ static unsigned int
HUerrBound(bool inexactMultiply, unsigned int HUerr1, unsigned int HUerr2)
{
assert(HUerr1 < 2 || HUerr2 < 2 || (HUerr1 + HUerr2 < 8));
@@ -389,7 +389,7 @@ namespace {
/* The number of ulps from the boundary (zero, or half if ISNEAREST)
when the least significant BITS are truncated. BITS cannot be
zero. */
- integerPart
+ static integerPart
ulpsFromBoundary(const integerPart *parts, unsigned int bits, bool isNearest)
{
unsigned int count, partBits;
@@ -434,7 +434,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. */
- unsigned int
+ static unsigned int
powerOf5(integerPart *dst, unsigned int power)
{
static integerPart firstEightPowers[] = { 1, 5, 25, 125, 625, 3125,
@@ -505,7 +505,7 @@ namespace {
/* Write out an integerPart in hexadecimal, starting with the most
significant nibble. Write out exactly COUNT hexdigits, return
COUNT. */
- unsigned int
+ static unsigned int
partAsHex (char *dst, integerPart part, unsigned int count,
const char *hexDigitChars)
{
@@ -523,7 +523,7 @@ namespace {
}
/* Write out an unsigned decimal integer. */
- char *
+ static char *
writeUnsignedDecimal (char *dst, unsigned int n)
{
char buff[40], *p;
@@ -541,7 +541,7 @@ namespace {
}
/* Write out a signed decimal integer. */
- char *
+ static char *
writeSignedDecimal (char *dst, int value)
{
if (value < 0) {
diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp
index cd95085..615fcac 100644
--- a/lib/Support/APInt.cpp
+++ b/lib/Support/APInt.cpp
@@ -2087,7 +2087,7 @@ namespace {
/* Returns the integer part with the least significant BITS set.
BITS cannot be zero. */
- inline integerPart
+ static inline integerPart
lowBitMask(unsigned int bits)
{
assert (bits != 0 && bits <= integerPartWidth);
@@ -2096,14 +2096,14 @@ namespace {
}
/* Returns the value of the lower half of PART. */
- inline integerPart
+ static inline integerPart
lowHalf(integerPart part)
{
return part & lowBitMask(integerPartWidth / 2);
}
/* Returns the value of the upper half of PART. */
- inline integerPart
+ static inline integerPart
highHalf(integerPart part)
{
return part >> (integerPartWidth / 2);
@@ -2111,7 +2111,7 @@ namespace {
/* Returns the bit number of the most significant set bit of a part.
If the input number has no bits set -1U is returned. */
- unsigned int
+ static unsigned int
partMSB(integerPart value)
{
unsigned int n, msb;
@@ -2136,7 +2136,7 @@ namespace {
/* Returns the bit number of the least significant set bit of a
part. If the input number has no bits set -1U is returned. */
- unsigned int
+ static unsigned int
partLSB(integerPart value)
{
unsigned int n, lsb;
diff --git a/lib/System/Unix/Signals.inc b/lib/System/Unix/Signals.inc
index f7149b1..3314a43 100644
--- a/lib/System/Unix/Signals.inc
+++ b/lib/System/Unix/Signals.inc
@@ -29,32 +29,32 @@ using namespace llvm;
namespace {
-bool StackTraceRequested = false;
+static bool StackTraceRequested = false;
/// InterruptFunction - The function to call if ctrl-c is pressed.
-void (*InterruptFunction)() = 0;
+static void (*InterruptFunction)() = 0;
-std::vector<sys::Path> *FilesToRemove = 0 ;
-std::vector<sys::Path> *DirectoriesToRemove = 0;
+static std::vector<sys::Path> *FilesToRemove = 0 ;
+static std::vector<sys::Path> *DirectoriesToRemove = 0;
// IntSigs - Signals that may interrupt the program at any time.
-const int IntSigs[] = {
+static const int IntSigs[] = {
SIGHUP, SIGINT, SIGQUIT, SIGPIPE, SIGTERM, SIGUSR1, SIGUSR2
};
-const int *IntSigsEnd = IntSigs + sizeof(IntSigs) / sizeof(IntSigs[0]);
+static const int *IntSigsEnd = IntSigs + sizeof(IntSigs) / sizeof(IntSigs[0]);
// KillSigs - Signals that are synchronous with the program that will cause it
// to die.
-const int KillSigs[] = {
+static const int KillSigs[] = {
SIGILL, SIGTRAP, SIGABRT, SIGFPE, SIGBUS, SIGSEGV, SIGSYS, SIGXCPU, SIGXFSZ
#ifdef SIGEMT
, SIGEMT
#endif
};
-const int *KillSigsEnd = KillSigs + sizeof(KillSigs) / sizeof(KillSigs[0]);
+static const int *KillSigsEnd = KillSigs + sizeof(KillSigs) / sizeof(KillSigs[0]);
#ifdef HAVE_BACKTRACE
-void* StackTrace[256];
+static void* StackTrace[256];
#endif
// PrintStackTrace - In the case of a program crash or fault, print out a stack
@@ -62,7 +62,7 @@ void* StackTrace[256];
//
// On glibc systems we have the 'backtrace' function, which works nicely, but
// doesn't demangle symbols.
-void PrintStackTrace() {
+static void PrintStackTrace() {
#ifdef HAVE_BACKTRACE
// Use backtrace() to output a backtrace on Linux systems with glibc.
int depth = backtrace(StackTrace, array_lengthof(StackTrace));
@@ -71,7 +71,7 @@ void PrintStackTrace() {
}
// SignalHandler - The signal handler that runs...
-RETSIGTYPE SignalHandler(int Sig) {
+static RETSIGTYPE SignalHandler(int Sig) {
if (FilesToRemove != 0)
while (!FilesToRemove->empty()) {
FilesToRemove->back().eraseFromDisk(true);
@@ -103,7 +103,7 @@ RETSIGTYPE SignalHandler(int Sig) {
}
// Just call signal
-void RegisterHandler(int Signal) {
+static void RegisterHandler(int Signal) {
signal(Signal, SignalHandler);
}
diff --git a/lib/VMCore/LeakDetector.cpp b/lib/VMCore/LeakDetector.cpp
index 41e0873..9f3584e 100644
--- a/lib/VMCore/LeakDetector.cpp
+++ b/lib/VMCore/LeakDetector.cpp
@@ -79,22 +79,22 @@ namespace {
const char* const Name;
};
- LeakDetectorImpl<void> *Objects;
- LeakDetectorImpl<Value> *LLVMObjects;
+ static LeakDetectorImpl<void> *Objects;
+ static LeakDetectorImpl<Value> *LLVMObjects;
- LeakDetectorImpl<void> &getObjects() {
+ static LeakDetectorImpl<void> &getObjects() {
if (Objects == 0)
Objects = new LeakDetectorImpl<void>("GENERIC");
return *Objects;
}
- LeakDetectorImpl<Value> &getLLVMObjects() {
+ static LeakDetectorImpl<Value> &getLLVMObjects() {
if (LLVMObjects == 0)
LLVMObjects = new LeakDetectorImpl<Value>("LLVM");
return *LLVMObjects;
}
- void clearGarbage() {
+ static void clearGarbage() {
delete Objects;
delete LLVMObjects;
Objects = 0;