Move to llvm-readobj code that is only used there.
lld might end up using a small part of this, but it will be in a much refactored form. For now this unblocks avoiding the full section scan in the ELFFile constructor. This also has a (very small) error handling improvement. llvm-svn: 244282
This commit is contained in:
@@ -191,7 +191,7 @@ namespace opts {
|
||||
namespace llvm {
|
||||
|
||||
void reportError(Twine Msg) {
|
||||
outs() << Msg << "\n";
|
||||
outs() << "\nError reading file: " << Msg << ".\n";
|
||||
outs().flush();
|
||||
exit(1);
|
||||
}
|
||||
@@ -200,7 +200,7 @@ void error(std::error_code EC) {
|
||||
if (!EC)
|
||||
return;
|
||||
|
||||
reportError(Twine("\nError reading file: ") + EC.message() + ".");
|
||||
reportError(EC.message());
|
||||
}
|
||||
|
||||
bool relocAddressLess(RelocationRef a, RelocationRef b) {
|
||||
|
||||
Reference in New Issue
Block a user