[llvm] r269864 - llvm-dwp: Move error handling code closer to use
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue May 17 16:37:44 PDT 2016
Author: dblaikie
Date: Tue May 17 18:37:44 2016
New Revision: 269864
URL: http://llvm.org/viewvc/llvm-project?rev=269864&view=rev
Log:
llvm-dwp: Move error handling code closer to use
Modified:
llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp
Modified: llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp?rev=269864&r1=269863&r2=269864&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp (original)
+++ llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp Tue May 17 18:37:44 2016
@@ -54,12 +54,6 @@ static opt<std::string> OutputFilename(R
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, Arra
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");
More information about the llvm-commits
mailing list