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)
llvm-svn: 244802

clang/lib/ASTMatchers/Dynamic/Registry.cpp

index 9c8fa1c..eda8c07 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;