mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 20:29:53 +00:00
llvm-dwp: Move error handling code closer to use
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269864 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
51510adcfa
commit
34ab13fd25
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user