[dsymutil] Make the warn and error helpers globally available. NFC.
authorFrederic Riss <friss@apple.com>
Wed, 26 Aug 2015 05:09:55 +0000 (05:09 +0000)
committerFrederic Riss <friss@apple.com>
Wed, 26 Aug 2015 05:09:55 +0000 (05:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246010 91177308-0d34-0410-b5e6-96231b3b80d8

tools/dsymutil/DwarfLinker.cpp
tools/dsymutil/dsymutil.h

index 5d9a4f86329a9e28b076d3bb3bceaaa0bc65a200..0be12375b2658ba3a5ac58e7f4722b412a36e495 100644 (file)
@@ -44,17 +44,6 @@ namespace dsymutil {
 
 namespace {
 
-void warn(const Twine &Warning, const Twine &Context) {
-  errs() << Twine("while processing ") + Context + ":\n";
-  errs() << Twine("warning: ") + Warning + "\n";
-}
-
-bool error(const Twine &Error, const Twine &Context) {
-  errs() << Twine("while processing ") + Context + ":\n";
-  errs() << Twine("error: ") + Error + "\n";
-  return false;
-}
-
 template <typename KeyT, typename ValT>
 using HalfOpenIntervalMap =
     IntervalMap<KeyT, ValT, IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize,
@@ -3090,6 +3079,17 @@ StringRef NonRelocatableStringpool::internString(StringRef S) {
   return InsertResult.first->getKey();
 }
 
+void warn(const Twine &Warning, const Twine &Context) {
+  errs() << Twine("while processing ") + Context + ":\n";
+  errs() << Twine("warning: ") + Warning + "\n";
+}
+
+bool error(const Twine &Error, const Twine &Context) {
+  errs() << Twine("while processing ") + Context + ":\n";
+  errs() << Twine("error: ") + Error + "\n";
+  return false;
+}
+
 bool linkDwarf(StringRef OutputFilename, const DebugMap &DM,
                const LinkOptions &Options) {
   DwarfLinker Linker(OutputFilename, Options);
index 239439a6a86e763d90aa87986e4c6372a43ff5f5..6a94063f28228ba47ee51643b6afbf1cf59a23a0 100644 (file)
@@ -48,6 +48,9 @@ bool linkDwarf(StringRef OutputFilename, const DebugMap &DM,
 /// \brief Exit the dsymutil process, cleaning up every temporary
 /// files that we created.
 LLVM_ATTRIBUTE_NORETURN void exitDsymutil(int ExitStatus);
+
+void warn(const Twine &Warning, const Twine &Context);
+bool error(const Twine &Error, const Twine &Context);
 }
 }
 #endif // LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H