mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-13 07:50:50 +00:00
Fix abuse of StringRef on ARM64SysReg::MRSMapper::toString(Val, Valid).
FIXME: Could we use SmallString here? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205950 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6c66c4d2eb
commit
f2eed86ea5
@ -1480,10 +1480,10 @@ void ARM64InstPrinter::printMRSSystemRegister(const MCInst *MI, unsigned OpNo,
|
|||||||
|
|
||||||
bool Valid;
|
bool Valid;
|
||||||
auto Mapper = ARM64SysReg::MRSMapper();
|
auto Mapper = ARM64SysReg::MRSMapper();
|
||||||
StringRef Name = Mapper.toString(Val, Valid);
|
std::string Name = Mapper.toString(Val, Valid);
|
||||||
|
|
||||||
if (Valid)
|
if (Valid)
|
||||||
O << StringRef(Name.str()).upper();
|
O << StringRef(Name).upper();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARM64InstPrinter::printMSRSystemRegister(const MCInst *MI, unsigned OpNo,
|
void ARM64InstPrinter::printMSRSystemRegister(const MCInst *MI, unsigned OpNo,
|
||||||
@ -1492,10 +1492,10 @@ void ARM64InstPrinter::printMSRSystemRegister(const MCInst *MI, unsigned OpNo,
|
|||||||
|
|
||||||
bool Valid;
|
bool Valid;
|
||||||
auto Mapper = ARM64SysReg::MSRMapper();
|
auto Mapper = ARM64SysReg::MSRMapper();
|
||||||
StringRef Name = Mapper.toString(Val, Valid);
|
std::string Name = Mapper.toString(Val, Valid);
|
||||||
|
|
||||||
if (Valid)
|
if (Valid)
|
||||||
O << StringRef(Name.str()).upper();
|
O << StringRef(Name).upper();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARM64InstPrinter::printSystemCPSRField(const MCInst *MI, unsigned OpNo,
|
void ARM64InstPrinter::printSystemCPSRField(const MCInst *MI, unsigned OpNo,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user