Skip to content

Commit efb966e

Browse files
committed
[MIRParser] Use Register::id(). Pass Twine by reference. NFC
1 parent 27757fb commit efb966e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/MIRParser/MIRParser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ bool MIRParserImpl::setupRegisterInfo(const PerFunctionMIParsingState &PFS,
767767

768768
bool Error = false;
769769
// Create VRegs
770-
auto populateVRegInfo = [&](const VRegInfo &Info, Twine Name) {
770+
auto populateVRegInfo = [&](const VRegInfo &Info, const Twine &Name) {
771771
Register Reg = Info.VReg;
772772
switch (Info.Kind) {
773773
case VRegInfo::UNKNOWN:
@@ -803,7 +803,7 @@ bool MIRParserImpl::setupRegisterInfo(const PerFunctionMIParsingState &PFS,
803803

804804
for (auto P : PFS.VRegInfos) {
805805
const VRegInfo &Info = *P.second;
806-
populateVRegInfo(Info, Twine(P.first));
806+
populateVRegInfo(Info, Twine(P.first.id()));
807807
}
808808

809809
// Compute MachineRegisterInfo::UsedPhysRegMask

0 commit comments

Comments
 (0)