diff options
author | Morgan Deters <mdeters@gmail.com> | 2011-11-06 02:09:06 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2011-11-06 02:09:06 +0000 |
commit | 0deb883f8c5ba550fda8b90501890940fd916a1b (patch) | |
tree | 645e90ff08d9120f207970f302661a149b988714 /src/util | |
parent | 4c7de64f3367940faf9c6af48631bc837795c46d (diff) |
datatype stuff in compatibility interface implemented
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/datatype.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/util/datatype.cpp b/src/util/datatype.cpp index 7d7c654bf..19415769e 100644 --- a/src/util/datatype.cpp +++ b/src/util/datatype.cpp @@ -471,6 +471,17 @@ Type Datatype::Constructor::doParametricSubstitution( Type range, } } +Datatype::Constructor::Constructor(std::string name) : + // We don't want to introduce a new data member, because eventually + // we're going to be a constant stuffed inside a node. So we stow + // the tester name away inside the constructor name until + // resolution. + d_name(name + '\0' + "is_" + name), // default tester name is "is_FOO" + d_tester(), + d_args() { + CheckArgument(name != "", name, "cannot construct a datatype constructor without a name"); +} + Datatype::Constructor::Constructor(std::string name, std::string tester) : // We don't want to introduce a new data member, because eventually // we're going to be a constant stuffed inside a node. So we stow |