IR: Stop explicitly clearing the MDStringCache
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 6 Apr 2016 17:56:05 +0000 (17:56 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 6 Apr 2016 17:56:05 +0000 (17:56 +0000)
The MDStringCache doesn't need to be explicitly cleared before
destruction.  The destructor handles it at least as efficiently.

llvm-svn: 265576

llvm/lib/IR/LLVMContextImpl.cpp

index 5239b4f..9fe1893 100644 (file)
@@ -158,9 +158,6 @@ LLVMContextImpl::~LLVMContextImpl() {
   // Destroy ValuesAsMetadata.
   for (auto &Pair : ValuesAsMetadata)
     delete Pair.second;
-
-  // Destroy MDStrings.
-  MDStringCache.clear();
 }
 
 void LLVMContextImpl::dropTriviallyDeadConstantArrays() {