[TableGen] Combine two constructors by taking vectors by value instead of trying to support combininations for rvalue and lvalue references.

llvm-svn: 334379
This commit is contained in:
Craig Topper 2018-06-10 23:15:48 +00:00
parent 3e5c70cc1d
commit d78567f16f
1 changed files with 3 additions and 11 deletions

View File

@ -998,20 +998,12 @@ public:
/// processed to produce isel.
class PatternToMatch {
public:
PatternToMatch(Record *srcrecord, const std::vector<Predicate> &preds,
PatternToMatch(Record *srcrecord, std::vector<Predicate> preds,
TreePatternNodePtr src, TreePatternNodePtr dst,
const std::vector<Record *> &dstregs, int complexity,
std::vector<Record *> dstregs, int complexity,
unsigned uid, unsigned setmode = 0)
: SrcRecord(srcrecord), SrcPattern(src), DstPattern(dst),
Predicates(preds), Dstregs(std::move(dstregs)),
AddedComplexity(complexity), ID(uid), ForceMode(setmode) {}
PatternToMatch(Record *srcrecord, std::vector<Predicate> &&preds,
TreePatternNodePtr src, TreePatternNodePtr dst,
std::vector<Record *> &&dstregs, int complexity, unsigned uid,
unsigned setmode = 0)
: SrcRecord(srcrecord), SrcPattern(src), DstPattern(dst),
Predicates(preds), Dstregs(std::move(dstregs)),
Predicates(std::move(preds)), Dstregs(std::move(dstregs)),
AddedComplexity(complexity), ID(uid), ForceMode(setmode) {}
Record *SrcRecord; // Originating Record for the pattern.