diff options
author | David Blaikie <dblaikie@gmail.com> | 2016-05-17 23:37:44 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2016-05-17 23:37:44 +0000 |
commit | 34ab13fd254c41ad00c9fe23a007a1c318b45959 (patch) | |
tree | 08650e6f627289a107d4aa01d313ce30c43d970f /tools/llvm-dwp | |
parent | 51510adcfaf2f2b9732f0bac25eb650a7944ef2c (diff) |
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
Diffstat (limited to 'tools/llvm-dwp')
-rw-r--r-- | tools/llvm-dwp/llvm-dwp.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/llvm-dwp/llvm-dwp.cpp b/tools/llvm-dwp/llvm-dwp.cpp index 1e1cb527b28..5a3d69bef85 100644 --- a/tools/llvm-dwp/llvm-dwp.cpp +++ b/tools/llvm-dwp/llvm-dwp.cpp @@ -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"); |