Move definitions to the correct file.
authorRui Ueyama <ruiu@google.com>
Sat, 13 Dec 2014 08:59:46 +0000 (08:59 +0000)
committerRui Ueyama <ruiu@google.com>
Sat, 13 Dec 2014 08:59:46 +0000 (08:59 +0000)
llvm-svn: 224190

lld/lib/Driver/GnuLdDriver.cpp
lld/lib/Driver/GnuLdInputGraph.cpp

index 00b5a69..36e2554 100644 (file)
@@ -163,21 +163,6 @@ static bool parseZOption(StringRef opt, uint64_t &val) {
   return true;
 }
 
-llvm::ErrorOr<StringRef> ELFFileNode::getPath(const LinkingContext &) const {
-  if (_attributes._isDashlPrefix)
-    return _elfLinkingContext.searchLibrary(_path);
-  return _elfLinkingContext.searchFile(_path, _attributes._isSysRooted);
-}
-
-std::string ELFFileNode::errStr(std::error_code errc) {
-  if (errc == llvm::errc::no_such_file_or_directory) {
-    if (_attributes._isDashlPrefix)
-      return (Twine("Unable to find library -l") + _path).str();
-    return (Twine("Unable to find file ") + _path).str();
-  }
-  return FileNode::errStr(errc);
-}
-
 bool GnuLdDriver::linkELF(int argc, const char *argv[],
                           raw_ostream &diagnostics) {
   BumpPtrAllocator alloc;
index 0475521..d13dbde 100644 (file)
@@ -9,11 +9,27 @@
 
 #include "lld/Driver/GnuLdInputGraph.h"
 #include "lld/ReaderWriter/LinkerScript.h"
+#include "llvm/Support/Errc.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Path.h"
 
 using namespace lld;
 
+llvm::ErrorOr<StringRef> ELFFileNode::getPath(const LinkingContext &) const {
+  if (_attributes._isDashlPrefix)
+    return _elfLinkingContext.searchLibrary(_path);
+  return _elfLinkingContext.searchFile(_path, _attributes._isSysRooted);
+}
+
+std::string ELFFileNode::errStr(std::error_code errc) {
+  if (errc == llvm::errc::no_such_file_or_directory) {
+    if (_attributes._isDashlPrefix)
+      return (Twine("Unable to find library -l") + _path).str();
+    return (Twine("Unable to find file ") + _path).str();
+  }
+  return FileNode::errStr(errc);
+}
+
 /// \brief Parse the input file to lld::File.
 std::error_code ELFFileNode::parse(const LinkingContext &ctx,
                                    raw_ostream &diagnostics) {