summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen/TGParser.cpp
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2018-02-22 15:26:28 +0000
committerNicolai Haehnle <nhaehnle@gmail.com>2018-02-22 15:26:28 +0000
commite4a2cf5761fef90c228a2d90c6f1fefa986561c8 (patch)
treea7c57853e05c190365854301660abdca2556fcc6 /llvm/lib/TableGen/TGParser.cpp
parentf19083d1edb26c2cd4535ac58327f48667a88043 (diff)
downloadbcm5719-llvm-e4a2cf5761fef90c228a2d90c6f1fefa986561c8.tar.gz
bcm5719-llvm-e4a2cf5761fef90c228a2d90c6f1fefa986561c8.zip
TableGen: Generalize type deduction for !listconcat
Summary: This way, it should work even with complex operands. Change-Id: Iaccf5bbb50bd5882a0ba5d59689e4381315fb361 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43554 llvm-svn: 325796
Diffstat (limited to 'llvm/lib/TableGen/TGParser.cpp')
-rw-r--r--llvm/lib/TableGen/TGParser.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp
index b6e207f7a74..12ae237c452 100644
--- a/llvm/lib/TableGen/TGParser.cpp
+++ b/llvm/lib/TableGen/TGParser.cpp
@@ -944,9 +944,7 @@ Init *TGParser::ParseOperation(Record *CurRec, RecTy *ItemType) {
// If we are doing !listconcat, we should know the type by now
if (OpTok == tgtok::XListConcat) {
- if (VarInit *Arg0 = dyn_cast<VarInit>(InitList[0]))
- Type = Arg0->getType();
- else if (ListInit *Arg0 = dyn_cast<ListInit>(InitList[0]))
+ if (TypedInit *Arg0 = dyn_cast<TypedInit>(InitList[0]))
Type = Arg0->getType();
else {
InitList[0]->print(errs());
OpenPOWER on IntegriCloud