forked from OSchip/llvm-project
parent
845ca8fba9
commit
53dd644c5d
|
@ -73,12 +73,14 @@ TemporaryFiles::~TemporaryFiles() {
|
|||
void TemporaryFiles::addFile(StringRef File) {
|
||||
llvm::MutexGuard Guard(Mutex);
|
||||
auto IsInserted = Files.insert(File).second;
|
||||
(void)IsInserted;
|
||||
assert(IsInserted && "File has already been added");
|
||||
}
|
||||
|
||||
void TemporaryFiles::removeFile(StringRef File) {
|
||||
llvm::MutexGuard Guard(Mutex);
|
||||
auto WasPresent = Files.erase(File);
|
||||
(void)WasPresent;
|
||||
assert(WasPresent && "File was not tracked");
|
||||
llvm::sys::fs::remove(File);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue