diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-05-22 18:08:30 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-05-22 18:08:30 +0000 |
| commit | e69a1b986617ce3f0da726c5c207af9177c44dc9 (patch) | |
| tree | e7c2202784445675e2aeeea398984728f1db5fa5 /llvm/lib/Bytecode/Reader/ReaderInternals.h | |
| parent | 9a1ad97ba0226a0e1badb3d3f3cac5920e29c550 (diff) | |
| download | bcm5719-llvm-e69a1b986617ce3f0da726c5c207af9177c44dc9.tar.gz bcm5719-llvm-e69a1b986617ce3f0da726c5c207af9177c44dc9.zip | |
Eliminate the uchar typedef, use unsigned char explicitly
llvm-svn: 6283
Diffstat (limited to 'llvm/lib/Bytecode/Reader/ReaderInternals.h')
| -rw-r--r-- | llvm/lib/Bytecode/Reader/ReaderInternals.h | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/llvm/lib/Bytecode/Reader/ReaderInternals.h b/llvm/lib/Bytecode/Reader/ReaderInternals.h index a8528e4113a..6709bc2d4d6 100644 --- a/llvm/lib/Bytecode/Reader/ReaderInternals.h +++ b/llvm/lib/Bytecode/Reader/ReaderInternals.h @@ -24,8 +24,6 @@ #define BCR_TRACE(n, X) #endif -typedef unsigned char uchar; - struct RawInst { // The raw fields out of the bytecode stream... unsigned NumOperands; unsigned Opcode; @@ -52,7 +50,7 @@ public: freeTable(ModuleValues); } - Module *ParseBytecode(const uchar *Buf, const uchar *EndBuf, + Module *ParseBytecode(const unsigned char *Buf, const unsigned char *EndBuf, const std::string &ModuleID); std::string getError() const { return Error; } @@ -128,24 +126,29 @@ private: } } - bool ParseModule (const uchar * Buf, const uchar *End); - bool ParseVersionInfo (const uchar *&Buf, const uchar *End); - bool ParseModuleGlobalInfo(const uchar *&Buf, const uchar *End); - bool ParseSymbolTable (const uchar *&Buf, const uchar *End, SymbolTable *); - bool ParseFunction (const uchar *&Buf, const uchar *End); - bool ParseBasicBlock (const uchar *&Buf, const uchar *End, BasicBlock *&); - bool ParseInstruction (const uchar *&Buf, const uchar *End, Instruction *&, - BasicBlock *BB /*HACK*/); - bool ParseRawInst (const uchar *&Buf, const uchar *End, RawInst &); - - bool ParseGlobalTypes(const uchar *&Buf, const uchar *EndBuf); - bool ParseConstantPool(const uchar *&Buf, const uchar *EndBuf, + bool ParseModule (const unsigned char * Buf, const unsigned char *End); + bool ParseVersionInfo (const unsigned char *&Buf, const unsigned char *End); + bool ParseModuleGlobalInfo(const unsigned char *&Buf, const unsigned char *E); + bool ParseSymbolTable (const unsigned char *&Buf, const unsigned char *End, + SymbolTable *); + bool ParseFunction (const unsigned char *&Buf, const unsigned char *End); + bool ParseBasicBlock (const unsigned char *&Buf, const unsigned char *End, + BasicBlock *&); + bool ParseInstruction (const unsigned char *&Buf, const unsigned char *End, + Instruction *&, BasicBlock *BB /*HACK*/); + bool ParseRawInst (const unsigned char *&Buf, const unsigned char *End, + RawInst &); + + bool ParseGlobalTypes(const unsigned char *&Buf, const unsigned char *EndBuf); + bool ParseConstantPool(const unsigned char *&Buf, const unsigned char *EndBuf, ValueTable &Tab, TypeValuesListTy &TypeTab); - bool parseConstantValue(const uchar *&Buf, const uchar *End, + bool parseConstantValue(const unsigned char *&Buf, const unsigned char *End, const Type *Ty, Constant *&V); - bool parseTypeConstants(const uchar *&Buf, const uchar *EndBuf, + bool parseTypeConstants(const unsigned char *&Buf, + const unsigned char *EndBuf, TypeValuesListTy &Tab, unsigned NumEntries); - const Type *parseTypeConstant(const uchar *&Buf, const uchar *EndBuf); + const Type *parseTypeConstant(const unsigned char *&Buf, + const unsigned char *EndBuf); Value *getValue(const Type *Ty, unsigned num, bool Create = true); const Type *getType(unsigned ID); @@ -212,7 +215,8 @@ static inline unsigned getValueIDNumberFromPlaceHolder(Value *Val) { } } -static inline bool readBlock(const uchar *&Buf, const uchar *EndBuf, +static inline bool readBlock(const unsigned char *&Buf, + const unsigned char *EndBuf, unsigned &Type, unsigned &Size) { #if DEBUG_OUTPUT bool Result = read(Buf, EndBuf, Type) || read(Buf, EndBuf, Size); |

