[lld] r219176 - Do not use llvm_unreachable at reachable code.
Rui Ueyama
ruiu at google.com
Mon Oct 6 17:40:55 PDT 2014
Author: ruiu
Date: Mon Oct 6 19:40:54 2014
New Revision: 219176
URL: http://llvm.org/viewvc/llvm-project?rev=219176&view=rev
Log:
Do not use llvm_unreachable at reachable code.
These lines can be reachable if we give a broken or unsupported
input object file.
Modified:
lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
Modified: lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp?rev=219176&r1=219175&r2=219176&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp Mon Oct 6 19:40:54 2014
@@ -558,7 +558,7 @@ void AtomChunk::applyRelocationsX86_32(u
targetAddr - getSectionStartAddr(targetAddr, sectionRva);
break;
default:
- llvm_unreachable("Unsupported relocation kind");
+ llvm::report_fatal_error("Unsupported relocation kind");
}
}
}
@@ -618,7 +618,7 @@ void AtomChunk::applyRelocationsX86_64(u
break;
default:
llvm::errs() << "Kind: " << (int)ref->kindValue() << "\n";
- llvm_unreachable("Unsupported relocation kind");
+ llvm::report_fatal_error("Unsupported relocation kind");
}
}
}
@@ -934,7 +934,7 @@ StringRef chooseSectionByContent(const D
}
llvm::errs() << "Atom: contentType=" << atom->contentType()
<< " permission=" << atom->permissions() << "\n";
- llvm_unreachable("Failed to choose section based on content");
+ llvm::report_fatal_error("Failed to choose section based on content");
}
typedef std::map<StringRef, std::vector<const DefinedAtom *> > AtomVectorMap;
More information about the llvm-commits
mailing list