[llvm-commits] CVS: llvm/lib/Bytecode/Writer/WriterPrimitives.h
Chris Lattner
lattner at cs.uiuc.edu
Thu Jan 15 00:12:01 PST 2004
Changes in directory llvm/lib/Bytecode/Writer:
WriterPrimitives.h updated: 1.3 -> 1.4
---
Log message:
Remove the optimization that depends on ENDIAN_LITTLE: it's not worth it.
---
Diffs of the changes: (+0 -8)
Index: llvm/lib/Bytecode/Writer/WriterPrimitives.h
diff -u llvm/lib/Bytecode/Writer/WriterPrimitives.h:1.3 llvm/lib/Bytecode/Writer/WriterPrimitives.h:1.4
--- llvm/lib/Bytecode/Writer/WriterPrimitives.h:1.3 Wed Jan 14 12:50:28 2004
+++ llvm/lib/Bytecode/Writer/WriterPrimitives.h Thu Jan 15 00:11:30 2004
@@ -27,13 +27,6 @@
//
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 @@
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) {
More information about the llvm-commits
mailing list