[llvm-commits] [llvm] r158274 - /llvm/trunk/lib/Support/Windows/Path.inc

Aaron Ballman aaron at aaronballman.com
Sat Jun 9 06:59:29 PDT 2012


Author: aaronballman
Date: Sat Jun  9 08:59:29 2012
New Revision: 158274

URL: http://llvm.org/viewvc/llvm-project?rev=158274&view=rev
Log:
Disabling a spurious deprecation warning about using PathV1 from within the PathV1 implementation file.

Modified:
    llvm/trunk/lib/Support/Windows/Path.inc

Modified: llvm/trunk/lib/Support/Windows/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Path.inc?rev=158274&r1=158273&r2=158274&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Path.inc (original)
+++ llvm/trunk/lib/Support/Windows/Path.inc Sat Jun  9 08:59:29 2012
@@ -189,7 +189,17 @@
 Path
 Path::GetTemporaryDirectory(std::string* ErrMsg) {
   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;
   }
 





More information about the llvm-commits mailing list