summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils/TableGen/Record.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/utils/TableGen/Record.cpp b/utils/TableGen/Record.cpp
index 8c47888dbe..3d42a5233c 100644
--- a/utils/TableGen/Record.cpp
+++ b/utils/TableGen/Record.cpp
@@ -1443,8 +1443,16 @@ Init *VarListElementInit::resolveBitReference(Record &R, const RecordVal *RV,
Init *VarListElementInit:: resolveListElementReference(Record &R,
const RecordVal *RV,
unsigned Elt) const {
- // FIXME: This should be implemented, to support references like:
- // int B = AA[0][1];
+ Init *Result = TI->resolveListElementReference(R, RV, Element);
+
+ if (Result) {
+ TypedInit *TInit = dynamic_cast<TypedInit *>(Result);
+ if (TInit) {
+ return TInit->resolveListElementReference(R, RV, Elt);
+ }
+ return Result;
+ }
+
return 0;
}