From 542c063f9614a6d11cffb3b8f1802e62f3a46136 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 27 May 2012 13:02:04 +0000 Subject: Path::GetTemporaryDirectory(): Add an assertion if TempDirectory is alive, to check when someone would remove the tempdir. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157529 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/Windows/Path.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Support') diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc index d8dc5226cc..aab0dff066 100644 --- a/lib/Support/Windows/Path.inc +++ b/lib/Support/Windows/Path.inc @@ -188,8 +188,10 @@ static Path *TempDirectory; Path Path::GetTemporaryDirectory(std::string* ErrMsg) { - if (TempDirectory) + if (TempDirectory) { + assert(TempDirectory->exists() && "Who has removed TempDirectory?"); return *TempDirectory; + } char pathname[MAX_PATH]; if (!GetTempPath(MAX_PATH, pathname)) { -- cgit v1.2.3-18-g5258