From 4f901d6d99de97eb6a7e09bcd0fd6dc7e91311ab Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Mon, 22 Sep 2003 23:35:54 +0000 Subject: Converted tabs to spaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8669 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Bytecode/Primitives.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'include/llvm/Bytecode') diff --git a/include/llvm/Bytecode/Primitives.h b/include/llvm/Bytecode/Primitives.h index f8158a0..a8094af 100644 --- a/include/llvm/Bytecode/Primitives.h +++ b/include/llvm/Bytecode/Primitives.h @@ -21,7 +21,7 @@ //===----------------------------------------------------------------------===// static inline bool read(const unsigned char *&Buf, const unsigned char *EndBuf, - unsigned &Result) { + unsigned &Result) { if (Buf+4 > EndBuf) return true; #ifdef ENDIAN_LITTLE Result = *(unsigned*)Buf; @@ -33,7 +33,7 @@ static inline bool read(const unsigned char *&Buf, const unsigned char *EndBuf, } static inline bool read(const unsigned char *&Buf, const unsigned char *EndBuf, - uint64_t &Result) { + uint64_t &Result) { if (Buf+8 > EndBuf) return true; #ifdef ENDIAN_LITTLE @@ -47,12 +47,12 @@ static inline bool read(const unsigned char *&Buf, const unsigned char *EndBuf, } static inline bool read(const unsigned char *&Buf, const unsigned char *EndBuf, - int &Result) { + int &Result) { return read(Buf, EndBuf, (unsigned &)Result); } static inline bool read(const unsigned char *&Buf, const unsigned char *EndBuf, - int64_t &Result) { + int64_t &Result) { return read(Buf, EndBuf, (uint64_t &)Result); } @@ -60,7 +60,7 @@ static inline bool read(const unsigned char *&Buf, const unsigned char *EndBuf, // read_vbr - Read an unsigned integer encoded in variable bitrate format. // static inline bool read_vbr(const unsigned char *&Buf, - const unsigned char *EndBuf, unsigned &Result) { + const unsigned char *EndBuf, unsigned &Result) { unsigned Shift = Result = 0; do { @@ -72,7 +72,7 @@ static inline bool read_vbr(const unsigned char *&Buf, } static inline bool read_vbr(const unsigned char *&Buf, - const unsigned char *EndBuf, uint64_t &Result) { + const unsigned char *EndBuf, uint64_t &Result) { unsigned Shift = 0; Result = 0; do { @@ -84,7 +84,7 @@ static inline bool read_vbr(const unsigned char *&Buf, // read_vbr (signed) - Read a signed number stored in sign-magnitude format static inline bool read_vbr(const unsigned char *&Buf, - const unsigned char *EndBuf, int &Result) { + const unsigned char *EndBuf, int &Result) { unsigned R; if (read_vbr(Buf, EndBuf, R)) return true; if (R & 1) @@ -97,7 +97,7 @@ static inline bool read_vbr(const unsigned char *&Buf, static inline bool read_vbr(const unsigned char *&Buf, - const unsigned char *EndBuf, int64_t &Result) { + const unsigned char *EndBuf, int64_t &Result) { uint64_t R; if (read_vbr(Buf, EndBuf, R)) return true; if (R & 1) @@ -110,13 +110,13 @@ static inline bool read_vbr(const unsigned char *&Buf, // align32 - Round up to multiple of 32 bits... static inline bool align32(const unsigned char *&Buf, - const unsigned char *EndBuf) { + const unsigned char *EndBuf) { Buf = (const unsigned char *)((unsigned long)(Buf+3) & (~3UL)); return Buf > EndBuf; } static inline bool read(const unsigned char *&Buf, const unsigned char *EndBuf, - std::string &Result, bool Aligned = true) { + std::string &Result, bool Aligned = true) { unsigned Size; if (read_vbr(Buf, EndBuf, Size)) return true; // Failure reading size? if (Buf+Size > EndBuf) return true; // Size invalid? @@ -131,8 +131,8 @@ 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) { + const unsigned char *EndBuf, + void *Ptr, void *End, bool Align = false) { unsigned char *Start = (unsigned char *)Ptr; unsigned Amount = (unsigned char *)End - Start; if (Buf+Amount > EndBuf) return true; @@ -245,7 +245,7 @@ static inline void align32(std::deque &Out) { } static inline void output(const std::string &s, std::deque &Out, - bool Aligned = true) { + bool Aligned = true) { unsigned Len = s.length(); output_vbr(Len, Out); // Strings may have an arbitrary length... Out.insert(Out.end(), s.begin(), s.end()); @@ -255,7 +255,7 @@ static inline void output(const std::string &s, std::deque &Out, } static inline void output_data(void *Ptr, void *End, - std::deque &Out, + std::deque &Out, bool Align = false) { #ifdef ENDIAN_LITTLE Out.insert(Out.end(), (unsigned char*)Ptr, (unsigned char*)End); -- cgit v1.1