Free memory when done with it.
authorChris Lattner <sabre@nondot.org>
Tue, 9 Apr 2002 15:04:37 +0000 (15:04 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 9 Apr 2002 15:04:37 +0000 (15:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2198 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetRegInfo.h

index 5225fea677bfaf6743efdcc0231081a63c5394ed..75ff72578e96fcc71d6b7517f9da342b11ba21be 100644 (file)
@@ -78,7 +78,10 @@ public:
   const TargetMachine &target;
 
   MachineRegInfo(const TargetMachine& tgt) : target(tgt) { }
-
+  ~MachineRegInfo() {
+    for (unsigned i = 0, e = MachineRegClassArr.size(); i != e; ++i)
+      delete MachineRegClassArr[i];
+  }
 
   // According the definition of a MachineOperand class, a Value in a
   // machine instruction can go into either a normal register or a