[llvm-commits] CVS: llvm/lib/Bytecode/Writer/WriterPrimitives.h

Chris Lattner lattner at cs.uiuc.edu
Wed Jan 14 12:51:01 PST 2004


Changes in directory llvm/lib/Bytecode/Writer:

WriterPrimitives.h updated: 1.2 -> 1.3

---
Log message:

It is obvious that this has never been used for outputing more than a single 
byte, it's totally endian incorrect!


---
Diffs of the changes:  (+1 -10)

Index: llvm/lib/Bytecode/Writer/WriterPrimitives.h
diff -u llvm/lib/Bytecode/Writer/WriterPrimitives.h:1.2 llvm/lib/Bytecode/Writer/WriterPrimitives.h:1.3
--- llvm/lib/Bytecode/Writer/WriterPrimitives.h:1.2	Wed Jan 14 12:41:38 2004
+++ llvm/lib/Bytecode/Writer/WriterPrimitives.h	Wed Jan 14 12:50:28 2004
@@ -123,17 +123,8 @@
 }
 
 static inline void output_data(const void *Ptr, const void *End,
-                               std::deque<unsigned char> &Out,
-                               bool Align = false) {
-#ifdef ENDIAN_LITTLE
+                               std::deque<unsigned char> &Out) {
   Out.insert(Out.end(), (const unsigned char*)Ptr, (const unsigned char*)End);
-#else
-  const unsigned char *E = (const unsigned char *)End;
-  while (Ptr != E)
-    Out.push_back(*--E);
-#endif
-
-  if (Align) align32(Out);
 }
 
 } // End llvm namespace





More information about the llvm-commits mailing list