[lld] r224190 - Move definitions to the correct file.

Rui Ueyama ruiu at google.com
Sat Dec 13 00:59:47 PST 2014


Author: ruiu
Date: Sat Dec 13 02:59:46 2014
New Revision: 224190

URL: http://llvm.org/viewvc/llvm-project?rev=224190&view=rev
Log:
Move definitions to the correct file.

Modified:
    lld/trunk/lib/Driver/GnuLdDriver.cpp
    lld/trunk/lib/Driver/GnuLdInputGraph.cpp

Modified: lld/trunk/lib/Driver/GnuLdDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/GnuLdDriver.cpp?rev=224190&r1=224189&r2=224190&view=diff
==============================================================================
--- lld/trunk/lib/Driver/GnuLdDriver.cpp (original)
+++ lld/trunk/lib/Driver/GnuLdDriver.cpp Sat Dec 13 02:59:46 2014
@@ -163,21 +163,6 @@ static bool parseZOption(StringRef opt,
   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;

Modified: lld/trunk/lib/Driver/GnuLdInputGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/GnuLdInputGraph.cpp?rev=224190&r1=224189&r2=224190&view=diff
==============================================================================
--- lld/trunk/lib/Driver/GnuLdInputGraph.cpp (original)
+++ lld/trunk/lib/Driver/GnuLdInputGraph.cpp Sat Dec 13 02:59:46 2014
@@ -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) {





More information about the llvm-commits mailing list