diff options
author | David Greene <greened@obbligato.org> | 2011-10-19 13:02:22 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2011-10-19 13:02:22 +0000 |
commit | de703e25fe98f7c0dfab1750cf337a013b5c9603 (patch) | |
tree | 484b4417ab39e83f54eedaeb9e29f1889e09b78c /include/llvm | |
parent | 941aa7b1e8c1b77544d643e8b23ff07f7f83f281 (diff) | |
download | external_llvm-de703e25fe98f7c0dfab1750cf337a013b5c9603.zip external_llvm-de703e25fe98f7c0dfab1750cf337a013b5c9603.tar.gz external_llvm-de703e25fe98f7c0dfab1750cf337a013b5c9603.tar.bz2 |
Add Init Accessors
Add a couple of utility functions to get at the name init and return
the name init as a string. This will be used for paste functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/TableGen/Record.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/TableGen/Record.h b/include/llvm/TableGen/Record.h index afce760..af8f963 100644 --- a/include/llvm/TableGen/Record.h +++ b/include/llvm/TableGen/Record.h @@ -1345,6 +1345,10 @@ public: RecordVal(const std::string &N, RecTy *T, unsigned P); const std::string &getName() const; + const Init *getNameInit() const { return Name; } + std::string getNameInitAsString() const { + return getNameInit()->getAsUnquotedString(); + } unsigned getPrefix() const { return Prefix; } RecTy *getType() const { return Ty; } |