diff options
Diffstat (limited to 'lib/Bytecode/Reader/ReaderInternals.h')
-rw-r--r-- | lib/Bytecode/Reader/ReaderInternals.h | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/lib/Bytecode/Reader/ReaderInternals.h b/lib/Bytecode/Reader/ReaderInternals.h index 42f7e1b463..1fefe23faf 100644 --- a/lib/Bytecode/Reader/ReaderInternals.h +++ b/lib/Bytecode/Reader/ReaderInternals.h @@ -14,8 +14,6 @@ #include "llvm/Bytecode/Primitives.h" #include <utility> #include <map> -#include <memory> -class Module; // Enable to trace to figure out what the heck is going on when parsing fails //#define TRACE_LEVEL 10 @@ -27,17 +25,6 @@ class Module; #define BCR_TRACE(n, X) #endif -struct RawInst { // The raw fields out of the bytecode stream... - unsigned NumOperands; - unsigned Opcode; - const Type *Ty; - unsigned Arg1, Arg2; - union { - unsigned Arg3; - std::vector<unsigned> *VarArgs; // Contains arg #3,4,5... if NumOperands > 3 - }; -}; - struct LazyFunctionInfo { const unsigned char *Buf, *EndBuf; unsigned FunctionSlot; @@ -62,11 +49,9 @@ public: Module* releaseModule() { // Since we're losing control of this Module, we must hand it back complete - materializeModule(); + Module *M = ModuleProvider::releaseModule(); freeState(); - Module *tempM = TheModule; - TheModule = 0; - return tempM; + return M; } void ParseBytecode(const unsigned char *Buf, unsigned Length, @@ -165,8 +150,6 @@ private: Instruction *ParseInstruction(const unsigned char *&Buf, const unsigned char *End); - std::auto_ptr<RawInst> ParseRawInst(const unsigned char *&Buf, - const unsigned char *End); void ParseConstantPool(const unsigned char *&Buf, const unsigned char *EndBuf, ValueTable &Tab, TypeValuesListTy &TypeTab); @@ -185,7 +168,7 @@ private: BasicBlock *getBasicBlock(unsigned ID); Constant *getConstantValue(const Type *Ty, unsigned num); - int insertValue(Value *V, ValueTable &Table); // -1 = Failure + unsigned insertValue(Value *V, ValueTable &Table); unsigned getTypeSlot(const Type *Ty); |