Support/PathV1: Deprecate makeAbsolute and remove Unix impl because it annoys people.
authorMichael J. Spencer <bigcheesegs@gmail.com>
Sat, 25 Dec 2010 20:10:11 +0000 (20:10 +0000)
committerMichael J. Spencer <bigcheesegs@gmail.com>
Sat, 25 Dec 2010 20:10:11 +0000 (20:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122553 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/PathV1.h
lib/Support/Unix/Path.inc

index b1b61b6c9a866c3c2553ed42248458429277859e..a22c40f51b375b489fe01d489565bf48a89d1608 100644 (file)
@@ -494,7 +494,9 @@ namespace sys {
 
       /// The current Path name is made absolute by prepending the
       /// current working directory if necessary.
-      void makeAbsolute();
+      LLVM_ATTRIBUTE_DEPRECATED(
+        void makeAbsolute(),
+        LLVMV_PATH_DEPRECATED_MSG(fs::make_absolute));
 
     /// @}
     /// @name Disk Mutators
index dccf9010ab5059455f16b1f5f7933d4307279ccb..b21245c82079e6156cee938076dfd7d9f6a0607e 100644 (file)
@@ -119,18 +119,6 @@ Path::isAbsolute() const {
   return path[0] == '/';
 }
 
-void Path::makeAbsolute() {
-  if (isAbsolute())
-    return;
-
-  Path CWD = Path::GetCurrentDirectory();
-  assert(CWD.isAbsolute() && "GetCurrentDirectory returned relative path!");
-
-  CWD.appendComponent(path);
-
-  path = CWD.str();
-}
-
 Path
 Path::GetRootDirectory() {
   Path result;