diff options
author | dim <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 |
commit | 721c201bd55ffb73cb2ba8d39e0570fa38c44e15 (patch) | |
tree | eacfc83d988e4b9d11114387ae7dc41243f2a363 /lib/Support/Windows/Path.inc | |
parent | 2b2816e083a455f7a656ae88b0fd059d1688bb36 (diff) | |
download | FreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.zip FreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.tar.gz |
Vendor import of llvm trunk r161861:
http://llvm.org/svn/llvm-project/llvm/trunk@161861
Diffstat (limited to 'lib/Support/Windows/Path.inc')
-rw-r--r-- | lib/Support/Windows/Path.inc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc index d8dc522..2280b34 100644 --- a/lib/Support/Windows/Path.inc +++ b/lib/Support/Windows/Path.inc @@ -188,8 +188,20 @@ static Path *TempDirectory; Path Path::GetTemporaryDirectory(std::string* ErrMsg) { - if (TempDirectory) + if (TempDirectory) { +#if defined(_MSC_VER) + // Visual Studio gets confused and emits a diagnostic about calling exists, + // even though this is the implementation for PathV1. Temporarily + // disable the deprecated warning message + #pragma warning(push) + #pragma warning(disable:4996) +#endif + assert(TempDirectory->exists() && "Who has removed TempDirectory?"); +#if defined(_MSC_VER) + #pragma warning(pop) +#endif return *TempDirectory; + } char pathname[MAX_PATH]; if (!GetTempPath(MAX_PATH, pathname)) { @@ -201,7 +213,7 @@ Path::GetTemporaryDirectory(std::string* ErrMsg) { Path result; result.set(pathname); - // Append a subdirectory passed on our process id so multiple LLVMs don't + // Append a subdirectory based on our process id so multiple LLVMs don't // step on each other's toes. #ifdef __MINGW32__ // Mingw's Win32 header files are broken. |