Skip to content

Commit 5e2c87b

Browse files
Prabhukellishg
andauthored
Emit fatal error instead of using error llvm_unreachable.
Co-authored-by: Ellis Hoag <[email protected]>
1 parent e1ced6f commit 5e2c87b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lld/MachO/InputFiles.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,9 +809,8 @@ void ObjFile::parseSymbols(ArrayRef<typename LP::section> sectionHeaders,
809809

810810
if ((sym.n_type & N_TYPE) == N_SECT) {
811811
if (sym.n_sect == 0) {
812-
error("Section symbol " + StringRef(strtab + sym.n_strx) + " in " +
812+
fatal("Section symbol " + StringRef(strtab + sym.n_strx) + " in " +
813813
toString(this) + " has an invalid section index of 0");
814-
llvm_unreachable("Section symbol without an associated section.");
815814
}
816815
Subsections &subsections = sections[sym.n_sect - 1]->subsections;
817816
// parseSections() may have chosen not to parse this section.

0 commit comments

Comments
 (0)