diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-10-04 15:28:08 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-10-04 15:28:08 +0000 |
| commit | 6fea31e7300fe012b0b2984d6bc0338d02b054d3 (patch) | |
| tree | 3301c3b43d565f885ecd7ce1e132629358884b10 /utils/TableGen/CodeGenRegisters.h | |
| parent | 877b6d43d4183e7b4bb6c99038c0d2b184dd3b3c (diff) | |
TableGen: Privatize CodeGenRegisterClass::TheDef and Name.
When TableGen starts creating its own register classes, the synthesized
classes won't have a Record reference. All register classes must have a
name, though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenRegisters.h')
| -rw-r--r-- | utils/TableGen/CodeGenRegisters.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/utils/TableGen/CodeGenRegisters.h b/utils/TableGen/CodeGenRegisters.h index f5759b557d..b8d2053cf9 100644 --- a/utils/TableGen/CodeGenRegisters.h +++ b/utils/TableGen/CodeGenRegisters.h @@ -93,8 +93,9 @@ namespace llvm { // List of super-classes, topologocally ordered to have the larger classes // first. This is the same as sorting by EnumValue. SmallVector<CodeGenRegisterClass*, 4> SuperClasses; - public: Record *TheDef; + std::string Name; + public: unsigned EnumValue; std::string Namespace; std::vector<MVT::SimpleValueType> VTs; @@ -106,7 +107,12 @@ namespace llvm { DenseMap<Record*,Record*> SubRegClasses; std::string AltOrderSelect; - const std::string &getName() const; + // Return the Record that defined this class, or NULL if the class was + // created by TableGen. + Record *getDef() const { return TheDef; } + + const std::string &getName() const { return Name; } + std::string getQualifiedName() const; const std::vector<MVT::SimpleValueType> &getValueTypes() const {return VTs;} unsigned getNumValueTypes() const { return VTs.size(); } |
