[cfe-commits] r89450 - /cfe/trunk/lib/CodeGen/CodeGenTypes.cpp

Eli Friedman eli.friedman at gmail.com
Thu Nov 19 21:53:07 PST 2009


Author: efriedma
Date: Thu Nov 19 23:53:06 2009
New Revision: 89450

URL: http://llvm.org/viewvc/llvm-project?rev=89450&view=rev
Log:
Fix a couple minor memory leaks.


Modified:
    cfe/trunk/lib/CodeGen/CodeGenTypes.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.cpp?rev=89450&r1=89449&r2=89450&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Thu Nov 19 23:53:06 2009
@@ -38,7 +38,13 @@
          I = CGRecordLayouts.begin(), E = CGRecordLayouts.end();
       I != E; ++I)
     delete I->second;
-  CGRecordLayouts.clear();
+  {
+    llvm::FoldingSet<CGFunctionInfo>::iterator
+         I = FunctionInfos.begin(), E = FunctionInfos.end();
+    while (I != E)
+      delete &*I++;
+  }
+  delete TheABIInfo;
 }
 
 /// ConvertType - Convert the specified type to its LLVM form.





More information about the cfe-commits mailing list