This repository was archived by the owner on Apr 23, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,15 @@ ScopeMatcher::~ScopeMatcher() {
84
84
delete Children[i];
85
85
}
86
86
87
+ SwitchOpcodeMatcher::~SwitchOpcodeMatcher () {
88
+ for (unsigned i = 0 , e = Cases.size (); i != e; ++i)
89
+ delete Cases[i].second ;
90
+ }
91
+
92
+ SwitchTypeMatcher::~SwitchTypeMatcher () {
93
+ for (unsigned i = 0 , e = Cases.size (); i != e; ++i)
94
+ delete Cases[i].second ;
95
+ }
87
96
88
97
CheckPredicateMatcher::CheckPredicateMatcher (const TreePredicateFn &pred)
89
98
: Matcher(CheckPredicate), Pred(pred.getOrigPatFragRecord()) {}
Original file line number Diff line number Diff line change @@ -505,6 +505,7 @@ class SwitchOpcodeMatcher : public Matcher {
505
505
public:
506
506
SwitchOpcodeMatcher (ArrayRef<std::pair<const SDNodeInfo*, Matcher*> > cases)
507
507
: Matcher(SwitchOpcode), Cases(cases.begin(), cases.end()) {}
508
+ virtual ~SwitchOpcodeMatcher ();
508
509
509
510
static inline bool classof (const Matcher *N) {
510
511
return N->getKind () == SwitchOpcode;
@@ -558,6 +559,7 @@ class SwitchTypeMatcher : public Matcher {
558
559
public:
559
560
SwitchTypeMatcher (ArrayRef<std::pair<MVT::SimpleValueType, Matcher*> > cases)
560
561
: Matcher(SwitchType), Cases(cases.begin(), cases.end()) {}
562
+ virtual ~SwitchTypeMatcher ();
561
563
562
564
static inline bool classof (const Matcher *N) {
563
565
return N->getKind () == SwitchType;
You can’t perform that action at this time.
0 commit comments