From: Michael J. Spencer Date: Sat, 25 Dec 2010 20:10:11 +0000 (+0000) Subject: Support/PathV1: Deprecate makeAbsolute and remove Unix impl because it annoys people. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=43ee29d418c4df3dee00e77bec7030bc10cb837c;p=oota-llvm.git Support/PathV1: Deprecate makeAbsolute and remove Unix impl because it annoys people. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122553 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/PathV1.h b/include/llvm/Support/PathV1.h index b1b61b6c9a8..a22c40f51b3 100644 --- a/include/llvm/Support/PathV1.h +++ b/include/llvm/Support/PathV1.h @@ -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 diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc index dccf9010ab5..b21245c8207 100644 --- a/lib/Support/Unix/Path.inc +++ b/lib/Support/Unix/Path.inc @@ -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;