summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-07-02 17:16:07 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-07-02 17:16:07 +0000
commit03e23121f80ca744a3bc8f5b17e88b7f4ff2c1f6 (patch)
tree5bae7fda3ad5c634a3a1477391bc81b4447b1140
parent7c691fee1cc8a2eba6b1523abee525f2d2ac8396 (diff)
downloadbcm5719-llvm-03e23121f80ca744a3bc8f5b17e88b7f4ff2c1f6.tar.gz
bcm5719-llvm-03e23121f80ca744a3bc8f5b17e88b7f4ff2c1f6.zip
Remove a report_fatal_error that should be unreachable.
If we created a relocation iterator, we have a valid relocation section. llvm-svn: 241286
-rw-r--r--llvm/include/llvm/Object/ELFObjectFile.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/include/llvm/Object/ELFObjectFile.h b/llvm/include/llvm/Object/ELFObjectFile.h
index 41aed2fcd9d..73e49f62ab5 100644
--- a/llvm/include/llvm/Object/ELFObjectFile.h
+++ b/llvm/include/llvm/Object/ELFObjectFile.h
@@ -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 {
OpenPOWER on IntegriCloud