[lld] r354703 - Remove a function from header and move the implementation to a .cpp file. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 22 15:59:48 PST 2019


Author: ruiu
Date: Fri Feb 22 15:59:43 2019
New Revision: 354703

URL: http://llvm.org/viewvc/llvm-project?rev=354703&view=rev
Log:
Remove a function from header and move the implementation to a .cpp file. NFC.

Modified:
    lld/trunk/Common/Reproduce.cpp
    lld/trunk/ELF/DriverUtils.cpp
    lld/trunk/include/lld/Common/Reproduce.h

Modified: lld/trunk/Common/Reproduce.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/Common/Reproduce.cpp?rev=354703&r1=354702&r2=354703&view=diff
==============================================================================
--- lld/trunk/Common/Reproduce.cpp (original)
+++ lld/trunk/Common/Reproduce.cpp Fri Feb 22 15:59:43 2019
@@ -48,12 +48,6 @@ std::string lld::quote(StringRef S) {
   return S;
 }
 
-std::string lld::rewritePath(StringRef S) {
-  if (fs::exists(S))
-    return relativeToRoot(S);
-  return S;
-}
-
 std::string lld::toString(const opt::Arg &Arg) {
   std::string K = Arg.getSpelling();
   if (Arg.getNumValues() == 0)

Modified: lld/trunk/ELF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/DriverUtils.cpp?rev=354703&r1=354702&r2=354703&view=diff
==============================================================================
--- lld/trunk/ELF/DriverUtils.cpp (original)
+++ lld/trunk/ELF/DriverUtils.cpp Fri Feb 22 15:59:43 2019
@@ -151,6 +151,12 @@ void elf::printHelp() {
   outs() << Config->ProgName << ": supported targets: elf\n";
 }
 
+static std::string rewritePath(StringRef S) {
+  if (fs::exists(S))
+    return relativeToRoot(S);
+  return S;
+}
+
 // Reconstructs command line arguments so that so that you can re-run
 // the same command with the same inputs. This is for --reproduce.
 std::string elf::createResponseFile(const opt::InputArgList &Args) {

Modified: lld/trunk/include/lld/Common/Reproduce.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Common/Reproduce.h?rev=354703&r1=354702&r2=354703&view=diff
==============================================================================
--- lld/trunk/include/lld/Common/Reproduce.h (original)
+++ lld/trunk/include/lld/Common/Reproduce.h Fri Feb 22 15:59:43 2019
@@ -27,10 +27,6 @@ std::string relativeToRoot(StringRef Pat
 // Quote a given string if it contains a space character.
 std::string quote(StringRef S);
 
-// Rewrite the given path if a file exists with that pathname, otherwise
-// returns the original path.
-std::string rewritePath(StringRef S);
-
 // Returns the string form of the given argument.
 std::string toString(const llvm::opt::Arg &Arg);
 }




More information about the llvm-commits mailing list