summaryrefslogtreecommitdiff
path: root/lib/Support/Windows/Path.inc
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2012-06-09 13:59:29 +0000
committerAaron Ballman <aaron@aaronballman.com>2012-06-09 13:59:29 +0000
commit133fe7542c361cccf806daedde1262c11b921f8c (patch)
tree6b45a8eae4d8a58162bdd88242600fbb4887680c /lib/Support/Windows/Path.inc
parent19472a6f5fdfc93bed2168f342c27c3de2d46f7a (diff)
Disabling a spurious deprecation warning about using PathV1 from within the PathV1 implementation file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Windows/Path.inc')
-rw-r--r--lib/Support/Windows/Path.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc
index 146d6b39851..2280b341714 100644
--- a/lib/Support/Windows/Path.inc
+++ b/lib/Support/Windows/Path.inc
@@ -189,7 +189,17 @@ static Path *TempDirectory;
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;
}