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) { void TemporaryFiles::addFile(StringRef File) {
llvm::MutexGuard Guard(Mutex); llvm::MutexGuard Guard(Mutex);
auto IsInserted = Files.insert(File).second; auto IsInserted = Files.insert(File).second;
(void)IsInserted;
assert(IsInserted && "File has already been added"); assert(IsInserted && "File has already been added");
} }
void TemporaryFiles::removeFile(StringRef File) { void TemporaryFiles::removeFile(StringRef File) {
llvm::MutexGuard Guard(Mutex); llvm::MutexGuard Guard(Mutex);
auto WasPresent = Files.erase(File); auto WasPresent = Files.erase(File);
(void)WasPresent;
assert(WasPresent && "File was not tracked"); assert(WasPresent && "File was not tracked");
llvm::sys::fs::remove(File); llvm::sys::fs::remove(File);
} }