Skip to content

Commit 965b944

Browse files
committed
[TableGen] Use emplace_back and const correct two reference arguments. NFC
1 parent 0db0c79 commit 965b944

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

llvm/utils/TableGen/CompressInstEmitter.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ class CompressInstEmitter {
118118

119119
bool IsCompressOnly;
120120
CompressPat(const CodeGenInstruction &S, const CodeGenInstruction &D,
121-
std::vector<const Record *> RF, IndexedMap<OpData> &SourceMap,
122-
IndexedMap<OpData> &DestMap, bool IsCompressOnly)
121+
std::vector<const Record *> RF,
122+
const IndexedMap<OpData> &SourceMap,
123+
const IndexedMap<OpData> &DestMap, bool IsCompressOnly)
123124
: Source(S), Dest(D), PatReqFeatures(std::move(RF)),
124125
SourceOperandMap(SourceMap), DestOperandMap(DestMap),
125126
IsCompressOnly(IsCompressOnly) {}
@@ -516,9 +517,9 @@ void CompressInstEmitter::evaluateCompressPat(const Record *Rec) {
516517
return R->getValueAsBit("AssemblerMatcherPredicate");
517518
});
518519

519-
CompressPatterns.push_back(CompressPat(
520-
SourceInst, DestInst, std::move(PatReqFeatures), SourceOperandMap,
521-
DestOperandMap, Rec->getValueAsBit("isCompressOnly")));
520+
CompressPatterns.emplace_back(SourceInst, DestInst, std::move(PatReqFeatures),
521+
SourceOperandMap, DestOperandMap,
522+
Rec->getValueAsBit("isCompressOnly"));
522523
}
523524

524525
static void

0 commit comments

Comments
 (0)