Fix unused-variable compilation error.

llvm-svn: 305898
This commit is contained in:
Haojian Wu 2017-06-21 11:26:58 +00:00
parent 845ca8fba9
commit 53dd644c5d
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}