[llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderPrimitives.h

Chris Lattner lattner at cs.uiuc.edu
Wed Jan 14 17:04:01 PST 2004


Changes in directory llvm/lib/Bytecode/Reader:

ReaderPrimitives.h updated: 1.1 -> 1.2

---
Log message:

Like output_data, it's obvious that input_data was only used with 1 character
data.


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

Index: llvm/lib/Bytecode/Reader/ReaderPrimitives.h
diff -u llvm/lib/Bytecode/Reader/ReaderPrimitives.h:1.1 llvm/lib/Bytecode/Reader/ReaderPrimitives.h:1.2
--- llvm/lib/Bytecode/Reader/ReaderPrimitives.h:1.1	Sat Jan 10 13:00:15 2004
+++ llvm/lib/Bytecode/Reader/ReaderPrimitives.h	Wed Jan 14 17:03:22 2004
@@ -132,20 +132,12 @@
 
 static inline bool input_data(const unsigned char *&Buf,
                               const unsigned char *EndBuf, 
-                              void *Ptr, void *End, bool Align = false) {
+                              void *Ptr, void *End) {
   unsigned char *Start = (unsigned char *)Ptr;
   unsigned Amount = (unsigned char *)End - Start;
   if (Buf+Amount > EndBuf) return true;
-#ifdef ENDIAN_LITTLE
   std::copy(Buf, Buf+Amount, Start);
   Buf += Amount;
-#else
-  unsigned char *E = (unsigned char *)End;
-  while (Ptr != E)
-    *--E = *Buf++;
-#endif
-
-  if (Align) return align32(Buf, EndBuf);
   return false;
 }
 





More information about the llvm-commits mailing list