summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-05-28 17:48:41 +0000
committerCraig Topper <craig.topper@gmail.com>2017-05-28 17:48:41 +0000
commit5a4ec2146154276f9497936cd82b620c47e1c739 (patch)
tree6bf2cd159da827b3153e263ef1b25ee38ce76fcc /llvm/utils/TableGen
parentb87931e9837b527205cd67d61adb20b075e06497 (diff)
downloadbcm5719-llvm-5a4ec2146154276f9497936cd82b620c47e1c739.tar.gz
bcm5719-llvm-5a4ec2146154276f9497936cd82b620c47e1c739.zip
[TableGen][X86] getValueAsString returns a std::string not a StringRef. Capture it that way to avoid a StringRef to a temporary.
llvm-svn: 304093
Diffstat (limited to 'llvm/utils/TableGen')
-rw-r--r--llvm/utils/TableGen/X86FoldTablesEmitter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/X86FoldTablesEmitter.cpp b/llvm/utils/TableGen/X86FoldTablesEmitter.cpp
index 4d860cbb16c..c2ca5734863 100644
--- a/llvm/utils/TableGen/X86FoldTablesEmitter.cpp
+++ b/llvm/utils/TableGen/X86FoldTablesEmitter.cpp
@@ -360,7 +360,7 @@ static inline const CodeGenInstruction *
getAltRegInst(const CodeGenInstruction *I, const RecordKeeper &Records,
const CodeGenTarget &Target) {
- StringRef AltRegInstStr = I->TheDef->getValueAsString("FoldGenRegForm");
+ std::string AltRegInstStr = I->TheDef->getValueAsString("FoldGenRegForm");
Record *AltRegInstRec = Records.getDef(AltRegInstStr);
assert(AltRegInstRec &&
"Alternative register form instruction def not found");
OpenPOWER on IntegriCloud