[llvm-commits] [llvm] r122580 - in /llvm/trunk: include/llvm/Support/PathV1.h lib/Support/Unix/Path.inc
Michael J. Spencer
bigcheesegs at gmail.com
Sun Dec 26 19:21:41 PST 2010
Author: mspencer
Date: Sun Dec 26 21:21:41 2010
New Revision: 122580
URL: http://llvm.org/viewvc/llvm-project?rev=122580&view=rev
Log:
Support/PathV1: Deprecate GetRootDirectory.
Modified:
llvm/trunk/include/llvm/Support/PathV1.h
llvm/trunk/lib/Support/Unix/Path.inc
Modified: llvm/trunk/include/llvm/Support/PathV1.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/PathV1.h?rev=122580&r1=122579&r2=122580&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/PathV1.h (original)
+++ llvm/trunk/include/llvm/Support/PathV1.h Sun Dec 26 21:21:41 2010
@@ -98,7 +98,8 @@
/// it is file:///. Other operating systems may have different notions of
/// what the root directory is or none at all. In that case, a consistent
/// default root directory will be used.
- static Path GetRootDirectory();
+ LLVM_ATTRIBUTE_DEPRECATED(static Path GetRootDirectory(),
+ LLVMV_PATH_DEPRECATED_MSG(NOTHING));
/// Construct a path to a unique temporary directory that is created in
/// a "standard" place for the operating system. The directory is
Modified: llvm/trunk/lib/Support/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=122580&r1=122579&r2=122580&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Path.inc (original)
+++ llvm/trunk/lib/Support/Unix/Path.inc Sun Dec 26 21:21:41 2010
@@ -242,12 +242,11 @@
Path
Path::GetUserHomeDirectory() {
const char* home = getenv("HOME");
- if (home) {
- Path result;
- if (result.set(home))
- return result;
- }
- return GetRootDirectory();
+ Path result;
+ if (home && result.set(home))
+ return result;
+ result.set("/");
+ return result;
}
Path
More information about the llvm-commits
mailing list