summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen/TGParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/TableGen/TGParser.cpp')
-rw-r--r--llvm/lib/TableGen/TGParser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp
index 5b8d730942b..cbee2e3289b 100644
--- a/llvm/lib/TableGen/TGParser.cpp
+++ b/llvm/lib/TableGen/TGParser.cpp
@@ -1418,13 +1418,13 @@ Init *TGParser::ParseSimpleValue(Record *CurRec, RecTy *ItemType,
if (!Operator) return nullptr;
// If the operator name is present, parse it.
- std::string OperatorName;
+ StringInit *OperatorName = nullptr;
if (Lex.getCode() == tgtok::colon) {
if (Lex.Lex() != tgtok::VarName) { // eat the ':'
TokError("expected variable name in dag operator");
return nullptr;
}
- OperatorName = Lex.getCurStrVal();
+ OperatorName = StringInit::get(Lex.getCurStrVal());
Lex.Lex(); // eat the VarName.
}
OpenPOWER on IntegriCloud