]> granicus.if.org Git - clang/commitdiff
Switching from an explicit loop to DeleteContainerSeconds; NFC.
authorAaron Ballman <aaron@aaronballman.com>
Wed, 12 Aug 2015 20:05:18 +0000 (20:05 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Wed, 12 Aug 2015 20:05:18 +0000 (20:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244802 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ASTMatchers/Dynamic/Registry.cpp

index 9c8fa1c9f502f8196521e13c28eba3230efe4cbf..eda8c0799514227d64c604428e181f111e003e8f 100644 (file)
@@ -15,6 +15,7 @@
 #include "clang/ASTMatchers/Dynamic/Registry.h"
 #include "Marshallers.h"
 #include "clang/ASTMatchers/ASTMatchers.h"
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/ManagedStatic.h"
@@ -358,8 +359,7 @@ RegistryMaps::RegistryMaps() {
 }
 
 RegistryMaps::~RegistryMaps() {
-  for (auto &E : Constructors)
-    delete E.getValue();
+  llvm::DeleteContainerSeconds(Constructors);
 }
 
 static llvm::ManagedStatic<RegistryMaps> RegistryData;