Fix a few memory leaks in CodeGenRegBank.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222930 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2014-11-28 20:30:39 +00:00
parent 0c83952c2e
commit da08412bd0
2 changed files with 7 additions and 0 deletions

View File

@ -1012,6 +1012,12 @@ CodeGenRegBank::CodeGenRegBank(RecordKeeper &Records) {
CodeGenRegisterClass::computeSubClasses(*this);
}
CodeGenRegBank::~CodeGenRegBank() {
DeleteContainerPointers(SubRegIndices);
DeleteContainerPointers(Registers);
DeleteContainerPointers(RegClasses);
}
// Create a synthetic CodeGenSubRegIndex without a corresponding Record.
CodeGenSubRegIndex*
CodeGenRegBank::createSubRegIndex(StringRef Name, StringRef Namespace) {

View File

@ -521,6 +521,7 @@ namespace llvm {
public:
CodeGenRegBank(RecordKeeper&);
~CodeGenRegBank();
SetTheory &getSets() { return Sets; }