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.

llvm-svn: 142494
This commit is contained in:
David Greene 2011-10-19 13:02:22 +00:00
parent deac50cba9
commit f73296f5aa
1 changed files with 4 additions and 0 deletions

View File

@ -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; }