aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TableGen/TGParser.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2016-07-05 21:22:55 +0000
committerTim Northover <tnorthover@apple.com>2016-07-05 21:22:55 +0000
commit88403d7a840f09395e45bb1e0a757cf8362beb5a (patch)
tree656c9a9ac1091389bf9493905c7b7925fdd8279a /llvm/lib/TableGen/TGParser.cpp
parentaaa0191be6643ad815b756877b37af50ee6e39cb (diff)
downloadllvm-88403d7a840f09395e45bb1e0a757cf8362beb5a.zip
llvm-88403d7a840f09395e45bb1e0a757cf8362beb5a.tar.gz
llvm-88403d7a840f09395e45bb1e0a757cf8362beb5a.tar.bz2
TableGen: promote "code" type from syntactic sugar.
It's being immediately converted to a "string", but being able to tell what type the field was originally can be useful in backends. llvm-svn: 274575
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 4239628..34e9092 100644
--- a/llvm/lib/TableGen/TGParser.cpp
+++ b/llvm/lib/TableGen/TGParser.cpp
@@ -660,7 +660,7 @@ RecTy *TGParser::ParseType() {
switch (Lex.getCode()) {
default: TokError("Unknown token when expecting a type"); return nullptr;
case tgtok::String: Lex.Lex(); return StringRecTy::get();
- case tgtok::Code: Lex.Lex(); return StringRecTy::get();
+ case tgtok::Code: Lex.Lex(); return CodeRecTy::get();
case tgtok::Bit: Lex.Lex(); return BitRecTy::get();
case tgtok::Int: Lex.Lex(); return IntRecTy::get();
case tgtok::Dag: Lex.Lex(); return DagRecTy::get();
@@ -1164,7 +1164,7 @@ Init *TGParser::ParseSimpleValue(Record *CurRec, RecTy *ItemType,
break;
}
case tgtok::CodeFragment:
- R = StringInit::get(Lex.getCurStrVal());
+ R = CodeInit::get(Lex.getCurStrVal());
Lex.Lex();
break;
case tgtok::question: