From c6098c06d58e0ad80f6ab4b4fe7b7b90d20b1d2d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 14 Jan 2004 23:03:22 +0000 Subject: Like output_data, it's obvious that input_data was only used with 1 character data. llvm-svn: 10861 --- llvm/lib/Bytecode/Reader/ReaderPrimitives.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'llvm/lib/Bytecode/Reader') diff --git a/llvm/lib/Bytecode/Reader/ReaderPrimitives.h b/llvm/lib/Bytecode/Reader/ReaderPrimitives.h index 01cb783d0ea..0b0cf2cb4f5 100644 --- a/llvm/lib/Bytecode/Reader/ReaderPrimitives.h +++ b/llvm/lib/Bytecode/Reader/ReaderPrimitives.h @@ -132,20 +132,12 @@ static inline bool read(const unsigned char *&Buf, const unsigned char *EndBuf, 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; } -- cgit v1.2.3