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 | ac46893e246748876d1155bb0c9e8892e52acab7 (patch) | |
| tree | a54b73e07975812ab9a5a60b7b0a81aedd30b89a /utils/TableGen/CodeGenTarget.cpp | |
| parent | f0c5f67dbc19f447af5c8e17f61a96f2718114bf (diff) | |
Split register class "Methods" into MethodProtos and MethodBodies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22928 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
| -rw-r--r-- | utils/TableGen/CodeGenTarget.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp index ffc5194738..8e7cbdc909 100644 --- a/utils/TableGen/CodeGenTarget.cpp +++ b/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)); |
