1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

llvm-dwp: Move error handling code closer to use

llvm-svn: 269864
This commit is contained in:
David Blaikie 2016-05-17 23:37:44 +00:00
parent 889b2555f5
commit 5fe872cab0

View File

@ -54,12 +54,6 @@ static opt<std::string> OutputFilename(Required, "o",
value_desc("filename"),
cat(DwpCategory));
static int error(const Twine &Error, const Twine &Context) {
errs() << Twine("while processing ") + Context + ":\n";
errs() << Twine("error: ") + Error + "\n";
return 1;
}
static Error
writeStringsAndOffsets(MCStreamer &Out, StringMap<uint32_t> &Strings,
uint32_t &StringOffset, MCSection *StrSection,
@ -587,6 +581,12 @@ static Error write(MCStreamer &Out, ArrayRef<std::string> Inputs) {
return Error();
}
static int error(const Twine &Error, const Twine &Context) {
errs() << Twine("while processing ") + Context + ":\n";
errs() << Twine("error: ") + Error + "\n";
return 1;
}
int main(int argc, char **argv) {
ParseCommandLineOptions(argc, argv, "merge split dwarf (.dwo) files");