summaryrefslogtreecommitdiff
path: root/utils/TableGen/Record.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/TableGen/Record.h')
-rw-r--r--utils/TableGen/Record.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h
index 95c50aea7f..a9ccf40468 100644
--- a/utils/TableGen/Record.h
+++ b/utils/TableGen/Record.h
@@ -304,6 +304,15 @@ struct Init {
return 0;
}
+ /// convertInitListSlice - This method is used to implement the list slice
+ /// selection operator. Given an initializer, it selects the specified list
+ /// elements, returning them as a new init of list type. If it is not legal
+ /// to take a slice of this, return null.
+ ///
+ virtual Init *convertInitListSlice(const std::vector<unsigned> &Elements) {
+ return 0;
+ }
+
/// getFieldType - This method is used to implement the FieldInit class.
/// Implementors of this method should return the type of the named field if
/// they are of record type.
@@ -466,6 +475,8 @@ public:
return Values[i];
}
+ Init *convertInitListSlice(const std::vector<unsigned> &Elements);
+
virtual Init *convertInitializerTo(RecTy *Ty) {
return Ty->convertValue(this);
}