diff options
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r-- | clang/lib/Basic/SourceManager.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index a630743..75855ad 100644 --- a/clang/lib/Basic/SourceManager.cpp +++ b/clang/lib/Basic/SourceManager.cpp @@ -324,8 +324,7 @@ SourceManager::~SourceManager() { ContentCacheAlloc.Deallocate(MemBufferInfos[i]); } } - for (llvm::DenseMap<const FileEntry*, SrcMgr::ContentCache*>::iterator - I = FileInfos.begin(), E = FileInfos.end(); I != E; ++I) { + for (auto I = FileInfos.begin(), E = FileInfos.end(); I != E; ++I) { if (I->second) { I->second->~ContentCache(); ContentCacheAlloc.Deallocate(I->second); @@ -702,7 +701,7 @@ void SourceManager::overrideFileContents(const FileEntry *SourceFile, assert(SourceFile->getSize() == NewFile.getSize() && "Different sizes, use the FileManager to create a virtual file with " "the correct size"); - assert(FileInfos.count(SourceFile) == 0 && + assert(FileInfos.find_as(SourceFile) == FileInfos.end() && "This function should be called at the initialization stage, before " "any parsing occurs."); // FileEntryRef is not default-constructible. |