[llvm] r241286 - Remove a report_fatal_error that should be unreachable.
Rafael Espindola
rafael.espindola at gmail.com
Thu Jul 2 10:16:08 PDT 2015
Author: rafael
Date: Thu Jul 2 12:16:07 2015
New Revision: 241286
URL: http://llvm.org/viewvc/llvm-project?rev=241286&view=rev
Log:
Remove a report_fatal_error that should be unreachable.
If we created a relocation iterator, we have a valid relocation section.
Modified:
llvm/trunk/include/llvm/Object/ELFObjectFile.h
Modified: llvm/trunk/include/llvm/Object/ELFObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELFObjectFile.h?rev=241286&r1=241285&r2=241286&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ELFObjectFile.h (original)
+++ llvm/trunk/include/llvm/Object/ELFObjectFile.h Thu Jul 2 12:16:07 2015
@@ -241,10 +241,7 @@ protected:
/// \brief Get the relocation section that contains \a Rel.
const Elf_Shdr *getRelSection(DataRefImpl Rel) const {
- ErrorOr<const Elf_Shdr *> Sec = EF.getSection(Rel.d.a);
- if (std::error_code EC = Sec.getError())
- report_fatal_error(EC.message());
- return *Sec;
+ return *EF.getSection(Rel.d.a);
}
const Elf_Sym *toELFSymIter(DataRefImpl Sym) const {
More information about the llvm-commits
mailing list