summaryrefslogtreecommitdiff
path: root/COFF/Symbols.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'COFF/Symbols.cpp')
-rw-r--r--COFF/Symbols.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/COFF/Symbols.cpp b/COFF/Symbols.cpp
index 6de85d581f494..c44537d371350 100644
--- a/COFF/Symbols.cpp
+++ b/COFF/Symbols.cpp
@@ -19,6 +19,13 @@
using namespace llvm;
using namespace llvm::object;
+// Returns a symbol name for an error message.
+std::string lld::toString(coff::SymbolBody &B) {
+ if (Optional<std::string> S = coff::demangle(B.getName()))
+ return ("\"" + *S + "\" (" + B.getName() + ")").str();
+ return B.getName();
+}
+
namespace lld {
namespace coff {
@@ -73,13 +80,5 @@ Defined *Undefined::getWeakAlias() {
return D;
return nullptr;
}
-
-// Returns a symbol name for an error message.
-std::string toString(SymbolBody &B) {
- if (Optional<std::string> S = demangle(B.getName()))
- return ("\"" + *S + "\" (" + B.getName() + ")").str();
- return B.getName();
-}
-
} // namespace coff
} // namespace lld