mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 02:16:46 +00:00
Delete the Matchers stored in the SmallVectors in SwitchOpcodeMatcher/SwitchTypeMatcher.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200377 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
99c3e481f3
commit
01a5c17219
@ -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