[dsymutil] Make the warn and error helpers globally available. NFC.
llvm-svn: 246010
diff --git a/llvm/tools/dsymutil/DwarfLinker.cpp b/llvm/tools/dsymutil/DwarfLinker.cpp
index 5d9a4f8..0be1237 100644
--- a/llvm/tools/dsymutil/DwarfLinker.cpp
+++ b/llvm/tools/dsymutil/DwarfLinker.cpp
@@ -44,17 +44,6 @@
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 @@
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);