[MCJIT] Temporarily revert r220245 - it broke several bots.
[oota-llvm.git] / include / llvm / Object / ELFTypes.h
index 21a49fb6eaa6bbd54094c252fd7e01259b46877a..9a23c8c4e49016eea1235ea5c82f2e21396fe935 100644 (file)
@@ -158,7 +158,7 @@ struct Elf_Sym_Base<ELFType<TargetEndianness, MaxAlign, false> > {
   Elf_Addr st_value;      // Value or address associated with the symbol
   Elf_Word st_size;       // Size of the symbol
   unsigned char st_info;  // Symbol's type and binding attributes
-  unsigned char st_other; // Visibility in the lower 2 bits, the rest is zero
+  unsigned char st_other; // Must be zero; reserved
   Elf_Half st_shndx;      // Which section (header table index) it's defined in
 };
 
@@ -167,7 +167,7 @@ struct Elf_Sym_Base<ELFType<TargetEndianness, MaxAlign, true> > {
   LLVM_ELF_IMPORT_TYPES(TargetEndianness, MaxAlign, true)
   Elf_Word st_name;       // Symbol name (index into string table)
   unsigned char st_info;  // Symbol's type and binding attributes
-  unsigned char st_other; // Visibility in the lower 2 bits, the rest is zero
+  unsigned char st_other; // Must be zero; reserved
   Elf_Half st_shndx;      // Which section (header table index) it's defined in
   Elf_Addr st_value;      // Value or address associated with the symbol
   Elf_Xword st_size;      // Size of the symbol
@@ -176,21 +176,16 @@ struct Elf_Sym_Base<ELFType<TargetEndianness, MaxAlign, true> > {
 template <class ELFT>
 struct Elf_Sym_Impl : Elf_Sym_Base<ELFT> {
   using Elf_Sym_Base<ELFT>::st_info;
-  using Elf_Sym_Base<ELFT>::st_other;
 
   // These accessors and mutators correspond to the ELF32_ST_BIND,
   // ELF32_ST_TYPE, and ELF32_ST_INFO macros defined in the ELF specification:
   unsigned char getBinding() const { return st_info >> 4; }
   unsigned char getType() const { return st_info & 0x0f; }
-  unsigned char getVisibility() const { return st_other & 0x3; }
   void setBinding(unsigned char b) { setBindingAndType(b, getType()); }
   void setType(unsigned char t) { setBindingAndType(getBinding(), t); }
   void setBindingAndType(unsigned char b, unsigned char t) {
     st_info = (b << 4) + (t & 0x0f);
   }
-  void setVisibility(unsigned char v) {
-    st_other = (st_other & ~0x3) | (v & 0x3);
-  }
 };
 
 /// Elf_Versym: This is the structure of entries in the SHT_GNU_versym section