Skip to content

Commit

Permalink
Merge pull request #1156 from ywgrit/main
Browse files Browse the repository at this point in the history
Remove assertions to make errors exposed in a customized way
  • Loading branch information
rui314 authored Nov 26, 2023
2 parents 000ce0e + d720a20 commit cab6014
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions elf/mold.h
Original file line number Diff line number Diff line change
Expand Up @@ -2417,8 +2417,6 @@ InputFile<E>::get_string(Context<E> &ctx, const ElfShdr<E> &shdr) {

template <typename E>
inline std::string_view InputFile<E>::get_string(Context<E> &ctx, i64 idx) {
assert(idx < elf_sections.size());

if (elf_sections.size() <= idx)
Fatal(ctx) << *this << ": invalid section index: " << idx;
return this->get_string(ctx, elf_sections[idx]);
Expand Down

0 comments on commit cab6014

Please sign in to comment.