1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Remove the optimization that depends on ENDIAN_LITTLE: it's not worth it.

llvm-svn: 10870
This commit is contained in:
Chris Lattner 2004-01-15 06:11:30 +00:00
parent 4a78294f54
commit 4d2cf11dbb

View File

@ -27,13 +27,6 @@ namespace llvm {
//
static inline void output(unsigned i, std::deque<unsigned char> &Out,
int pos = -1) {
#ifdef ENDIAN_LITTLE
if (pos == -1)
Out.insert(Out.end(), (unsigned char*)&i, (unsigned char*)&i+4);
else
// This cannot use block copy because deques are not guaranteed contiguous!
std::copy((unsigned char*)&i, 4+(unsigned char*)&i, Out.begin()+pos);
#else
if (pos == -1) { // Be endian clean, little endian is our friend
Out.push_back((unsigned char)i);
Out.push_back((unsigned char)(i >> 8));
@ -45,7 +38,6 @@ static inline void output(unsigned i, std::deque<unsigned char> &Out,
Out[pos+2] = (unsigned char)(i >> 16);
Out[pos+3] = (unsigned char)(i >> 24);
}
#endif
}
static inline void output(int i, std::deque<unsigned char> &Out) {