diff options
author | Chris Lattner <sabre@nondot.org> | 2003-08-10 22:38:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-08-10 22:38:36 +0000 |
commit | 990db46e9ae7faa742a152ca4126d0bee9f1df9c (patch) | |
tree | fe6de6e535fb4c8acfe51afc28f14f33e8487844 /utils/TableGen/Record.h | |
parent | 91290d7e9a743de363049e705a8303ae1f3a6e68 (diff) | |
download | external_llvm-990db46e9ae7faa742a152ca4126d0bee9f1df9c.zip external_llvm-990db46e9ae7faa742a152ca4126d0bee9f1df9c.tar.gz external_llvm-990db46e9ae7faa742a152ca4126d0bee9f1df9c.tar.bz2 |
Implement autopromotion of leaf trees from arguments to nodes of their own,
making it easier to write patterns without lots of extraneous parens
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/Record.h')
-rw-r--r-- | utils/TableGen/Record.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h index 8831250..4a2fa05 100644 --- a/utils/TableGen/Record.h +++ b/utils/TableGen/Record.h @@ -619,6 +619,11 @@ public: return ArgNames[Num]; } + void setArg(unsigned Num, Init *I) { + assert(Num < Args.size() && "Arg number out of range!"); + Args[Num] = I; + } + virtual void print(std::ostream &OS) const; }; |