[llvm-commits] [llvm] r142495 - /llvm/trunk/include/llvm/TableGen/Record.h

David Greene greened at obbligato.org
Wed Oct 19 06:02:28 PDT 2011


Author: greened
Date: Wed Oct 19 08:02:28 2011
New Revision: 142495

URL: http://llvm.org/viewvc/llvm-project?rev=142495&view=rev
Log:
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.

Modified:
    llvm/trunk/include/llvm/TableGen/Record.h

Modified: llvm/trunk/include/llvm/TableGen/Record.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/TableGen/Record.h?rev=142495&r1=142494&r2=142495&view=diff
==============================================================================
--- llvm/trunk/include/llvm/TableGen/Record.h (original)
+++ llvm/trunk/include/llvm/TableGen/Record.h Wed Oct 19 08:02:28 2011
@@ -1404,6 +1404,13 @@
   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.
 





More information about the llvm-commits mailing list