Skip to content

Commit f626620

Browse files
authored
[LLVM][TableGen] Use StringRef for CodeGenInstruction::AsmString (#144440)
1 parent 8b1528f commit f626620

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/utils/TableGen/Common/CodeGenInstruction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ void CGIOperandList::ProcessDisableEncoding(StringRef DisableEncoding) {
435435
CodeGenInstruction::CodeGenInstruction(const Record *R)
436436
: TheDef(R), Operands(R), InferredFrom(nullptr) {
437437
Namespace = R->getValueAsString("Namespace");
438-
AsmString = R->getValueAsString("AsmString").str();
438+
AsmString = R->getValueAsString("AsmString");
439439

440440
isPreISelOpcode = R->getValueAsBit("isPreISelOpcode");
441441
isReturn = R->getValueAsBit("isReturn");

llvm/utils/TableGen/Common/CodeGenInstruction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ class CodeGenInstruction {
226226

227227
/// AsmString - The format string used to emit a .s file for the
228228
/// instruction.
229-
std::string AsmString;
229+
StringRef AsmString;
230230

231231
/// Operands - This is information about the (ins) and (outs) list specified
232232
/// to the instruction.

0 commit comments

Comments
 (0)