diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-05-27 13:02:04 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-05-27 13:02:04 +0000 |
commit | 542c063f9614a6d11cffb3b8f1802e62f3a46136 (patch) | |
tree | 368899c0d85e961b03dbc45dfe47c93ea0d60b2e /lib/Support | |
parent | cf1d69df7e39a45fd1c7a07452271c586580164e (diff) |
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
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/Windows/Path.inc | 4 |
1 files changed, 3 insertions, 1 deletions
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)) { |