mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Delete the Matchers stored in the SmallVectors in SwitchOpcodeMatcher/SwitchTypeMatcher.
llvm-svn: 200377
This commit is contained in:
parent
a50ca1f645
commit
237e63c6ee
@ -84,6 +84,15 @@ ScopeMatcher::~ScopeMatcher() {
|
||||
delete Children[i];
|
||||
}
|
||||
|
||||
SwitchOpcodeMatcher::~SwitchOpcodeMatcher() {
|
||||
for (unsigned i = 0, e = Cases.size(); i != e; ++i)
|
||||
delete Cases[i].second;
|
||||
}
|
||||
|
||||
SwitchTypeMatcher::~SwitchTypeMatcher() {
|
||||
for (unsigned i = 0, e = Cases.size(); i != e; ++i)
|
||||
delete Cases[i].second;
|
||||
}
|
||||
|
||||
CheckPredicateMatcher::CheckPredicateMatcher(const TreePredicateFn &pred)
|
||||
: Matcher(CheckPredicate), Pred(pred.getOrigPatFragRecord()) {}
|
||||
|
@ -505,6 +505,7 @@ class SwitchOpcodeMatcher : public Matcher {
|
||||
public:
|
||||
SwitchOpcodeMatcher(ArrayRef<std::pair<const SDNodeInfo*, Matcher*> > cases)
|
||||
: Matcher(SwitchOpcode), Cases(cases.begin(), cases.end()) {}
|
||||
virtual ~SwitchOpcodeMatcher();
|
||||
|
||||
static inline bool classof(const Matcher *N) {
|
||||
return N->getKind() == SwitchOpcode;
|
||||
@ -558,6 +559,7 @@ class SwitchTypeMatcher : public Matcher {
|
||||
public:
|
||||
SwitchTypeMatcher(ArrayRef<std::pair<MVT::SimpleValueType, Matcher*> > cases)
|
||||
: Matcher(SwitchType), Cases(cases.begin(), cases.end()) {}
|
||||
virtual ~SwitchTypeMatcher();
|
||||
|
||||
static inline bool classof(const Matcher *N) {
|
||||
return N->getKind() == SwitchType;
|
||||
|
Loading…
Reference in New Issue
Block a user