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 | b030e8a5c804552597a917caf8948b9952a3663d (patch) | |
tree | ec1e1a770c81667e0b3e51fe76540b91e99ad25e /llvm/lib/Support/Windows | |
parent | ce6ad6748a2b54eee9538ef9fac34e03ae568ca9 (diff) | |
download | bcm5719-llvm-b030e8a5c804552597a917caf8948b9952a3663d.tar.gz bcm5719-llvm-b030e8a5c804552597a917caf8948b9952a3663d.zip |
Path::GetTemporaryDirectory(): Add an assertion if TempDirectory is alive, to check when someone would remove the tempdir.
llvm-svn: 157529
Diffstat (limited to 'llvm/lib/Support/Windows')
-rw-r--r-- | llvm/lib/Support/Windows/Path.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc index d8dc5226cce..aab0dff066e 100644 --- a/llvm/lib/Support/Windows/Path.inc +++ b/llvm/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)) { |