Skip to content

Commit

Permalink
Add Name Init Accessors
Browse files Browse the repository at this point in the history
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
  • Loading branch information
greened committed Oct 19, 2011
1 parent de703e2 commit d7f8941
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/llvm/TableGen/Record.h
Original file line number Diff line number Diff line change
Expand Up @@ -1404,6 +1404,13 @@ class Record {
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.

Expand Down

0 comments on commit d7f8941

Please sign in to comment.