mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-28 09:31:03 +00:00
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
This commit is contained in:
parent
cf1d69df7e
commit
542c063f96
@ -188,8 +188,10 @@ static Path *TempDirectory;
|
|||||||
|
|
||||||
Path
|
Path
|
||||||
Path::GetTemporaryDirectory(std::string* ErrMsg) {
|
Path::GetTemporaryDirectory(std::string* ErrMsg) {
|
||||||
if (TempDirectory)
|
if (TempDirectory) {
|
||||||
|
assert(TempDirectory->exists() && "Who has removed TempDirectory?");
|
||||||
return *TempDirectory;
|
return *TempDirectory;
|
||||||
|
}
|
||||||
|
|
||||||
char pathname[MAX_PATH];
|
char pathname[MAX_PATH];
|
||||||
if (!GetTempPath(MAX_PATH, pathname)) {
|
if (!GetTempPath(MAX_PATH, pathname)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user