From dbc3b00df5bee8d082b9a74e2d21aac4f9671b1d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 9 Apr 2002 15:04:37 +0000 Subject: [PATCH] Free memory when done with it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2198 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetRegInfo.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/llvm/Target/TargetRegInfo.h b/include/llvm/Target/TargetRegInfo.h index 5225fea677b..75ff72578e9 100644 --- a/include/llvm/Target/TargetRegInfo.h +++ b/include/llvm/Target/TargetRegInfo.h @@ -78,7 +78,10 @@ public: const TargetMachine ⌖ 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 -- 2.34.1