diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-08-19 19:12:51 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-08-19 19:12:51 +0000 |
| commit | 73ec2cb0f577a8a89a627553504efcc0de47e317 (patch) | |
| tree | e175826469f21fdb6b5a06f92271b6734e8ba76d /llvm/utils/TableGen/CodeGenTarget.cpp | |
| parent | 248933eb393496034cb2c3cdb67731d737a92444 (diff) | |
Split register class "Methods" into MethodProtos and MethodBodies
llvm-svn: 22928
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp')
| -rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp index ffc519473856..8e7cbdc90937 100644 --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -153,12 +153,18 @@ CodeGenRegisterClass::CodeGenRegisterClass(Record *R) : TheDef(R) { SpillSize = R->getValueAsInt("Size"); SpillAlignment = R->getValueAsInt("Alignment"); - if (CodeInit *CI = dynamic_cast<CodeInit*>(R->getValueInit("Methods"))) - MethodDefinitions = CI->getValue(); + if (CodeInit *CI = dynamic_cast<CodeInit*>(R->getValueInit("MethodBodies"))) + MethodBodies = CI->getValue(); else - throw "Expected 'code' fragment for 'Methods' value in register class '"+ - getName() + "'!"; + throw "Expected 'code' fragment for 'MethodBodies' value in register " + "class '" + getName() + "'!"; + if (CodeInit *CI = dynamic_cast<CodeInit*>(R->getValueInit("MethodProtos"))) + MethodProtos = CI->getValue(); + else + throw "Expected 'code' fragment for 'MethodProtos' value in register " + "class '" + getName() + "'!"; + ListInit *RegList = R->getValueAsListInit("MemberList"); for (unsigned i = 0, e = RegList->getSize(); i != e; ++i) { DefInit *RegDef = dynamic_cast<DefInit*>(RegList->getElement(i)); |
