summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2011-10-19 13:02:28 +0000
committerDavid Greene <greened@obbligato.org>2011-10-19 13:02:28 +0000
commitd7f8941e77fef20dc147fe102a2024cc5ccef366 (patch)
tree3174adfbef03fbce8bafad906014fb869833c46e /include
parentde703e25fe98f7c0dfab1750cf337a013b5c9603 (diff)
downloadllvm-d7f8941e77fef20dc147fe102a2024cc5ccef366.tar.gz
llvm-d7f8941e77fef20dc147fe102a2024cc5ccef366.tar.bz2
llvm-d7f8941e77fef20dc147fe102a2024cc5ccef366.tar.xz
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
Diffstat (limited to 'include')
-rw-r--r--include/llvm/TableGen/Record.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/TableGen/Record.h b/include/llvm/TableGen/Record.h
index af8f963361..22e761f44a 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.