Instead of int64_t, overload itostr with `long long' parameter.

This appeases both SparcV9 and 64-bit PowerPC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15910 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Misha Brukman 2004-08-18 22:56:12 +00:00
parent 43dfdb779b
commit 8831db745b
2 changed files with 14 additions and 16 deletions

View File

@ -55,14 +55,6 @@ static inline std::string utostr(unsigned long long X, bool isNeg = false) {
return std::string(BufPtr);
}
static inline std::string itostr(int64_t X) {
if (X < 0)
return utostr(static_cast<uint64_t>(-X), true);
else
return utostr(static_cast<uint64_t>(X));
}
static inline std::string utostr(unsigned long X, bool isNeg = false) {
return utostr(static_cast<unsigned long long>(X), isNeg);
}
@ -84,6 +76,13 @@ static inline std::string utostr(unsigned X, bool isNeg = false) {
return std::string(BufPtr);
}
static inline std::string itostr(long long X) {
if (X < 0)
return utostr(static_cast<uint64_t>(-X), true);
else
return utostr(static_cast<uint64_t>(X));
}
static inline std::string itostr(long X) {
if (X < 0)
return utostr(static_cast<uint64_t>(-X), true);

View File

@ -55,14 +55,6 @@ static inline std::string utostr(unsigned long long X, bool isNeg = false) {
return std::string(BufPtr);
}
static inline std::string itostr(int64_t X) {
if (X < 0)
return utostr(static_cast<uint64_t>(-X), true);
else
return utostr(static_cast<uint64_t>(X));
}
static inline std::string utostr(unsigned long X, bool isNeg = false) {
return utostr(static_cast<unsigned long long>(X), isNeg);
}
@ -84,6 +76,13 @@ static inline std::string utostr(unsigned X, bool isNeg = false) {
return std::string(BufPtr);
}
static inline std::string itostr(long long X) {
if (X < 0)
return utostr(static_cast<uint64_t>(-X), true);
else
return utostr(static_cast<uint64_t>(X));
}
static inline std::string itostr(long X) {
if (X < 0)
return utostr(static_cast<uint64_t>(-X), true);