summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2011-10-19 13:02:22 +0000
committerDavid Greene <greened@obbligato.org>2011-10-19 13:02:22 +0000
commitde703e25fe98f7c0dfab1750cf337a013b5c9603 (patch)
tree484b4417ab39e83f54eedaeb9e29f1889e09b78c /include
parent941aa7b1e8c1b77544d643e8b23ff07f7f83f281 (diff)
downloadllvm-de703e25fe98f7c0dfab1750cf337a013b5c9603.tar.gz
llvm-de703e25fe98f7c0dfab1750cf337a013b5c9603.tar.bz2
llvm-de703e25fe98f7c0dfab1750cf337a013b5c9603.tar.xz
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')
-rw-r--r--include/llvm/TableGen/Record.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/TableGen/Record.h b/include/llvm/TableGen/Record.h
index afce760998..af8f963361 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; }