From: David Greene Date: Wed, 19 Oct 2011 13:02:28 +0000 (+0000) Subject: Add Name Init Accessors X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d7f8941e77fef20dc147fe102a2024cc5ccef366;p=oota-llvm.git Add Name Init Accessors Add a utility to get the name init and get the string representation of the name. This will be used for paste functionality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142495 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/TableGen/Record.h b/include/llvm/TableGen/Record.h index af8f9633617..22e761f44ae 100644 --- a/include/llvm/TableGen/Record.h +++ b/include/llvm/TableGen/Record.h @@ -1404,6 +1404,13 @@ public: unsigned getID() const { return ID; } const std::string &getName() const; + Init *getNameInit() const { + return Name; + } + const std::string getNameInitAsString() const { + return getNameInit()->getAsUnquotedString(); + } + void setName(Init *Name); // Also updates RecordKeeper. void setName(const std::string &Name); // Also updates RecordKeeper.