Remove use of reverse iterators in repairIntervalsInRange(). While they were
[oota-llvm.git] / include / llvm / Object / ELF.h
index bcd5b11f208480785b58cc00cb05409b1f3bc837..bd3bbe1e4fab699ce9ab7e26a0cce181e47756a5 100644 (file)
@@ -702,6 +702,10 @@ public:
   virtual library_iterator begin_libraries_needed() const;
   virtual library_iterator end_libraries_needed() const;
 
+  const Elf_Shdr *getDynamicSymbolTableSectionHeader() const {
+    return SymbolTableSections[0];
+  }
+
   Elf_Dyn_iterator begin_dynamic_table() const;
   Elf_Dyn_iterator end_dynamic_table() const;
 
@@ -863,6 +867,7 @@ void ELFObjectFile<ELFT>::LoadVersionMap() const {
 
 template<class ELFT>
 void ELFObjectFile<ELFT>::validateSymbol(DataRefImpl Symb) const {
+#ifndef NDEBUG
   const Elf_Sym  *symb = getSymbol(Symb);
   const Elf_Shdr *SymbolTableSection = SymbolTableSections[Symb.d.b];
   // FIXME: We really need to do proper error handling in the case of an invalid
@@ -877,6 +882,7 @@ void ELFObjectFile<ELFT>::validateSymbol(DataRefImpl Symb) const {
                    + SymbolTableSection->sh_size)))
     // FIXME: Proper error handling.
     report_fatal_error("Symb must point to a valid symbol!");
+#endif
 }
 
 template<class ELFT>