From de703e25fe98f7c0dfab1750cf337a013b5c9603 Mon Sep 17 00:00:00 2001 From: David Greene Date: Wed, 19 Oct 2011 13:02:22 +0000 Subject: 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 --- include/llvm/TableGen/Record.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') 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; } -- cgit v1.2.3