git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158274
91177308-0d34-0410-b5e6-
96231b3b80d8
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;
}