From 8c06318821e4febb3a7f1afbab72dae362f1bf5f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 30 Mar 2006 22:50:40 +0000 Subject: Implement Regression/TableGen/DagDefSubst.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27263 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/Record.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'utils/TableGen/Record.h') diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h index a4175e5845..26a97013d7 100644 --- a/utils/TableGen/Record.h +++ b/utils/TableGen/Record.h @@ -808,17 +808,17 @@ public: } }; -/// DagInit - (def a, b) - Represent a DAG tree value. DAG inits are required -/// to have Records for their first value, after that, any legal Init is -/// possible. +/// DagInit - (v a, b) - Represent a DAG tree value. DAG inits are required +/// to have at least one value then a (possibly empty) list of arguments. Each +/// argument can have a name associated with it. /// class DagInit : public Init { - Record *NodeTypeDef; + Init *Val; std::vector Args; std::vector ArgNames; public: - DagInit(Record *D, const std::vector > &args) - : NodeTypeDef(D) { + DagInit(Init *V, const std::vector > &args) + : Val(V) { Args.reserve(args.size()); ArgNames.reserve(args.size()); for (unsigned i = 0, e = args.size(); i != e; ++i) { @@ -826,16 +826,16 @@ public: ArgNames.push_back(args[i].second); } } - DagInit(Record *D, const std::vector &args, + DagInit(Init *V, const std::vector &args, const std::vector &argNames) - : NodeTypeDef(D), Args(args), ArgNames(argNames) { + : Val(V), Args(args), ArgNames(argNames) { } virtual Init *convertInitializerTo(RecTy *Ty) { return Ty->convertValue(this); } - Record *getNodeType() const { return NodeTypeDef; } + Init *getOperator() const { return Val; } unsigned getNumArgs() const { return Args.size(); } Init *getArg(unsigned Num) const { -- cgit v1.2.3