Implement the "thread_local" keyword.
[oota-llvm.git] / include / llvm / Bytecode / BytecodeHandler.h
index c12ac099b8e8c96442aabba9e67b2ebb2706ed31..3d885e123fbb02976748df673ec7d96b0ec35849 100644 (file)
@@ -23,7 +23,7 @@ namespace llvm {
 class ArrayType;
 class StructType;
 class PointerType;
-class PackedType;
+class VectorType;
 class ConstantArray;
 class Module;
 
@@ -96,9 +96,7 @@ public:
   /// read.
   /// @brief Handle the bytecode prolog
   virtual void handleVersionInfo(
-    unsigned char RevisionNum,        ///< Byte code revision number
-    Module::Endianness Endianness,    ///< Endianness indicator
-    Module::PointerSize PointerSize   ///< PointerSize indicator
+    unsigned char RevisionNum        ///< Byte code revision number
   ) {}
 
   /// This method is called at the start of a module globals block which
@@ -112,8 +110,10 @@ public:
     const Type* ElemType,     ///< The type of the global variable
     bool isConstant,          ///< Whether the GV is constant or not
     GlobalValue::LinkageTypes,///< The linkage type of the GV
+    GlobalValue::VisibilityTypes,///< The visibility style of the GV
     unsigned SlotNum,         ///< Slot number of GV
-    unsigned initSlot         ///< Slot number of GV's initializer (0 if none)
+    unsigned initSlot,         ///< Slot number of GV's initializer (0 if none)
+    bool isThreadLocal        ///< Whether the GV is thread local or not
   ) {}
 
   /// This method is called when a type list is recognized. It simply
@@ -154,44 +154,15 @@ public:
   /// @brief Handle end of module globals block.
   virtual void handleModuleGlobalsEnd() {}
 
-  /// This method is called at the beginning of a compaction table.
-  /// @brief Handle start of compaction table.
-  virtual void handleCompactionTableBegin() {}
-
-  /// @brief Handle start of a compaction table plane
-  virtual void handleCompactionTablePlane(
-    unsigned Ty,         ///< The type of the plane (slot number)
-    unsigned NumEntries  ///< The number of entries in the plane
-  ) {}
-
-  /// @brief Handle a type entry in the compaction table
-  virtual void handleCompactionTableType(
-    unsigned i,       ///< Index in the plane of this type
-    unsigned TypSlot, ///< Slot number for this type
-    const Type*       ///< The type referenced by this slot
-  ) {}
-
-  /// @brief Handle a value entry in the compaction table
-  virtual void handleCompactionTableValue(
-    unsigned i,       ///< Index in the compaction table's type plane
-    unsigned TypSlot, ///< The slot (plane) of the type of this value
-    unsigned ValSlot  ///< The global value slot of the value
-  ) {}
-
-  /// @brief Handle end of a compaction table
-  virtual void handleCompactionTableEnd() {}
-
   /// @brief Handle start of a symbol table
-  virtual void handleSymbolTableBegin(
-    Function* Func,  ///< The function to which the ST belongs
-    SymbolTable* ST  ///< The symbol table being filled
+  virtual void handleTypeSymbolTableBegin(
+    TypeSymbolTable* ST  ///< The symbol table being filled
   ) {}
 
-  /// @brief Handle start of a symbol table plane
-  virtual void handleSymbolTablePlane(
-    unsigned TySlot,      ///< The slotnum of the type plane
-    unsigned NumEntries,  ///< Number of entries in the plane
-    const Type* Typ       ///< The type of this type plane
+  /// @brief Handle start of a symbol table
+  virtual void handleValueSymbolTableBegin(
+    Function* Func,       ///< The function to which the ST belongs or 0 for Mod
+    ValueSymbolTable* ST  ///< The symbol table being filled
   ) {}
 
   /// @brief Handle a named type in the symbol table
@@ -205,11 +176,14 @@ public:
   virtual void handleSymbolTableValue(
     unsigned i,              ///< The index of the value in this plane
     unsigned slot,           ///< Slot number of the named value
-    const std::string& name  ///< Name of the value.
+    const char *name, unsigned NameLen  ///< Name of the value.
   ) {}
 
-  /// @brief Handle the end of a symbol table
-  virtual void handleSymbolTableEnd() {}
+  /// @brief Handle the end of a value symbol table
+  virtual void handleTypeSymbolTableEnd() {}
+
+  /// @brief Handle the end of a type symbol table
+  virtual void handleValueSymbolTableEnd() {}
 
   /// @brief Handle the beginning of a function body
   virtual void handleFunctionBegin(
@@ -233,7 +207,8 @@ public:
   virtual bool handleInstruction(
     unsigned Opcode,                 ///< Opcode of the instruction
     const Type* iType,               ///< Instruction type
-    std::vector<unsigned>& Operands, ///< Vector of slot # operands
+    unsigned *Operands, unsigned NumOps, ///< Vector of slot # operands
+    Instruction *Inst,               ///< The resulting instruction
     unsigned Length                  ///< Length of instruction in bc bytes
   ) { return false; }
 
@@ -248,14 +223,14 @@ public:
   /// @brief Handle a constant expression
   virtual void handleConstantExpression(
     unsigned Opcode,  ///< Opcode of primary expression operator
-    std::vector<Constant*> ArgVec, ///< expression args
+    Constant**Args, unsigned NumArgs, ///< expression args
     Constant* C ///< The constant value
   ) {}
 
   /// @brief Handle a constant array
   virtual void handleConstantArray(
     const ArrayType* AT,                ///< Type of the array
-    std::vector<Constant*>& ElementSlots,///< Slot nums for array values
+    Constant**ElementSlots, unsigned NumElts,///< Slot nums for array values
     unsigned TypeSlot,                  ///< Slot # of type
     Constant* Val                       ///< The constant value
   ) {}
@@ -263,14 +238,14 @@ public:
   /// @brief Handle a constant structure
   virtual void handleConstantStruct(
     const StructType* ST,               ///< Type of the struct
-    std::vector<Constant*>& ElementSlots,///< Slot nums for struct values
+    Constant**ElementSlots, unsigned NumElts,///< Slot nums for struct values
     Constant* Val                       ///< The constant value
   ) {}
 
   /// @brief Handle a constant packed
-  virtual void handleConstantPacked(
-    const PackedType* PT,                ///< Type of the array
-    std::vector<Constant*>& ElementSlots,///< Slot nums for packed values
+  virtual void handleConstantVector(
+    const VectorType* PT,                ///< Type of the array
+    Constant**ElementSlots, unsigned NumElts,///< Slot nums for packed values
     unsigned TypeSlot,                  ///< Slot # of type
     Constant* Val                       ///< The constant value
   ) {}
@@ -307,19 +282,9 @@ public:
     unsigned Size                  ///< The size of the block
   ) {}
 
-  /// @brief Handle a variable bit rate 32 bit unsigned
-  virtual void handleVBR32(
-    unsigned Size  ///< Number of bytes the vbr_uint took up
-  ) {}
-
-  /// @brief Handle a variable bit rate 64 bit unsigned
-  virtual void handleVBR64(
-    unsigned Size  ///< Number of byte sthe vbr_uint64 took up
-  ) {}
 /// @}
 
 };
 
 }
-// vim: sw=2 ai
 #endif