summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen/TGParser.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-12-05 06:00:41 +0000
committerMatthias Braun <matze@braunis.de>2016-12-05 06:00:41 +0000
commit7cf3b112248267e517758894ab8e6333792aea60 (patch)
tree08c0c3411d941d1c2ae9ddf37b1ba837e34ac4a1 /llvm/lib/TableGen/TGParser.cpp
parent6a441839a6a75f3844116a30703cf14027325b0d (diff)
downloadbcm5719-llvm-7cf3b112248267e517758894ab8e6333792aea60.tar.gz
bcm5719-llvm-7cf3b112248267e517758894ab8e6333792aea60.zip
TableGen: Use StringInit instead of std::string for DagInit name
llvm-svn: 288643
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