mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 05:32:25 +00:00
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:
parent
43dfdb779b
commit
8831db745b
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user