From: NAKAMURA Takumi Date: Sun, 27 May 2012 13:02:04 +0000 (+0000) Subject: Path::GetTemporaryDirectory(): Add an assertion if TempDirectory is alive, to check... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=542c063f9614a6d11cffb3b8f1802e62f3a46136;p=oota-llvm.git 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 --- diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc index d8dc5226cce..aab0dff066e 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)) {