r244802 - Switching from an explicit loop to DeleteContainerSeconds; NFC.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 12 13:05:18 PDT 2015


Author: aaronballman
Date: Wed Aug 12 15:05:18 2015
New Revision: 244802

URL: http://llvm.org/viewvc/llvm-project?rev=244802&view=rev
Log:
Switching from an explicit loop to DeleteContainerSeconds; NFC.

Modified:
    cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp

Modified: cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp?rev=244802&r1=244801&r2=244802&view=diff
==============================================================================
--- cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp (original)
+++ cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp Wed Aug 12 15:05:18 2015
@@ -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;




More information about the cfe-commits mailing list