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 | bd92dc608d71e8ded6a27d12473ff238983a22f7 (patch) | |
tree | 92c5066b3488d16bdc842a69f62a5fe8913815a3 /llvm/utils/TableGen/CodeGenRegisters.h | |
parent | 54dd16240c7b9706b6e4da198898779b9fa42124 (diff) | |
download | bcm5719-llvm-bd92dc608d71e8ded6a27d12473ff238983a22f7.tar.gz bcm5719-llvm-bd92dc608d71e8ded6a27d12473ff238983a22f7.zip |
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.
llvm-svn: 141081
Diffstat (limited to 'llvm/utils/TableGen/CodeGenRegisters.h')
-rw-r--r-- | llvm/utils/TableGen/CodeGenRegisters.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/CodeGenRegisters.h b/llvm/utils/TableGen/CodeGenRegisters.h index f5759b557dc..b8d2053cf9e 100644 --- a/llvm/utils/TableGen/CodeGenRegisters.h +++ b/llvm/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(); } |