summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
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
commitd8570e5bc21e114ae79df20d84b0a50de7ae1f07 (patch)
treef8997adbf17f8eb895f8f3cbe9e621c0c8db5284 /llvm/lib/Target
parentc5e0099ffc3a9d30333165b8f4206d0ec27c0f5c (diff)
downloadbcm5719-llvm-d8570e5bc21e114ae79df20d84b0a50de7ae1f07.tar.gz
bcm5719-llvm-d8570e5bc21e114ae79df20d84b0a50de7ae1f07.zip
Fix abuse of StringRef on ARM64SysReg::MRSMapper::toString(Val, Valid).
FIXME: Could we use SmallString here? llvm-svn: 205950
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp b/llvm/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp
index 8c0e6fa9179..cd410ab4597 100644
--- a/llvm/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp
+++ b/llvm/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,
OpenPOWER on IntegriCloud