aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-07-22 22:01:58 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-07-22 22:01:58 +0000
commitb1561f1e235328ef1f45c1ea770813b2034987b0 (patch)
treed2a8447fc9c50b19a70eb2a672ae8289f1ce6d3d
parent36d7d91616c1f27ed7c734c4419aa76cd1c71e1a (diff)
downloadllvm-b1561f1e235328ef1f45c1ea770813b2034987b0.zip
llvm-b1561f1e235328ef1f45c1ea770813b2034987b0.tar.gz
llvm-b1561f1e235328ef1f45c1ea770813b2034987b0.tar.bz2
Use the enum value for RegClassIDs.
llvm-svn: 135816
-rw-r--r--llvm/utils/TableGen/RegisterInfoEmitter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/RegisterInfoEmitter.cpp b/llvm/utils/TableGen/RegisterInfoEmitter.cpp
index 6ee0a7b..4d319a9 100644
--- a/llvm/utils/TableGen/RegisterInfoEmitter.cpp
+++ b/llvm/utils/TableGen/RegisterInfoEmitter.cpp
@@ -328,8 +328,10 @@ RegisterInfoEmitter::runMCDesc(raw_ostream &OS, CodeGenTarget &Target,
for (unsigned rc = 0, e = RegisterClasses.size(); rc != e; ++rc) {
const CodeGenRegisterClass &RC = RegisterClasses[rc];
- OS << " MCRegisterClass("
- << rc << ", "
+ OS << " MCRegisterClass(";
+ if (!RC.Namespace.empty())
+ OS << RC.Namespace << "::";
+ OS << RC.getName() + "RegClassID" << ", "
<< '\"' << RC.getName() << "\", "
<< RC.SpillSize/8 << ", "
<< RC.SpillAlignment/8 << ", "