summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2014-04-10 03:05:59 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2014-04-10 03:05:59 +0000
commitf2eed86ea59e27eaae6caab72d8a46a431f266df (patch)
treeb88618e3d7c4d66b3db7d0aa92b0d7eb9461cc49
parent6c66c4d2ebb32768a7f11d9e792083856e4d58bb (diff)
downloadllvm-f2eed86ea59e27eaae6caab72d8a46a431f266df.tar.gz
llvm-f2eed86ea59e27eaae6caab72d8a46a431f266df.tar.bz2
llvm-f2eed86ea59e27eaae6caab72d8a46a431f266df.tar.xz
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
-rw-r--r--lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp b/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp
index 8c0e6fa917..cd410ab459 100644
--- a/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp
+++ b/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp
@@ -1480,10 +1480,10 @@ void ARM64InstPrinter::printMRSSystemRegister(const MCInst *MI, unsigned OpNo,
bool Valid;
auto Mapper = ARM64SysReg::MRSMapper();
- StringRef Name = Mapper.toString(Val, Valid);
+ std::string Name = Mapper.toString(Val, Valid);
if (Valid)
- O << StringRef(Name.str()).upper();
+ O << StringRef(Name).upper();
}
void ARM64InstPrinter::printMSRSystemRegister(const MCInst *MI, unsigned OpNo,
@@ -1492,10 +1492,10 @@ void ARM64InstPrinter::printMSRSystemRegister(const MCInst *MI, unsigned OpNo,
bool Valid;
auto Mapper = ARM64SysReg::MSRMapper();
- StringRef Name = Mapper.toString(Val, Valid);
+ std::string Name = Mapper.toString(Val, Valid);
if (Valid)
- O << StringRef(Name.str()).upper();
+ O << StringRef(Name).upper();
}
void ARM64InstPrinter::printSystemCPSRField(const MCInst *MI, unsigned OpNo,