diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-10 19:08:50 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-10 19:08:50 +0000 |
commit | ac6b4f2c0c03bd90435477ed5b705205d28601d0 (patch) | |
tree | b181a692e4721d2b88b62c0d6de524abcc57f7b0 /utils/TableGen | |
parent | 8e00117e0409016374a1bc88efc5971088a4a8c0 (diff) | |
download | external_llvm-ac6b4f2c0c03bd90435477ed5b705205d28601d0.zip external_llvm-ac6b4f2c0c03bd90435477ed5b705205d28601d0.tar.gz external_llvm-ac6b4f2c0c03bd90435477ed5b705205d28601d0.tar.bz2 |
llvm-mc/AsmMatcher: Remove some code which has been obsoleted by move to
explicit parser match classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78588 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/AsmMatcherEmitter.cpp | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index 0356cb8..0f3f9ed 100644 --- a/utils/TableGen/AsmMatcherEmitter.cpp +++ b/utils/TableGen/AsmMatcherEmitter.cpp @@ -293,9 +293,6 @@ struct ClassInfo { /// N) for the Nth user defined class. unsigned Kind; - /// SuperClassKind - The super class kind for user classes. - unsigned SuperClassKind; - /// SuperClass - The super class, or 0. ClassInfo *SuperClass; @@ -525,6 +522,7 @@ ClassInfo *AsmMatcherInfo::getTokenClass(const StringRef &Token) { if (!Entry) { Entry = new ClassInfo(); Entry->Kind = ClassInfo::Token; + Entry->SuperClass = 0; Entry->ClassName = "Token"; Entry->Name = "MCK_" + getEnumNameForToken(Token); Entry->ValueName = Token; @@ -562,7 +560,7 @@ void AsmMatcherInfo::BuildInfo(CodeGenTarget &Target) { // FIXME: This needs to dice up the RegisterClass instances. ClassInfo *RegClass = TheRegisterClass = new ClassInfo(); RegClass->Kind = ClassInfo::Register; - RegClass->SuperClassKind = ClassInfo::Invalid; + RegClass->SuperClass = 0; RegClass->ClassName = "Reg"; RegClass->Name = "MCK_Reg"; RegClass->ValueName = "<register class>"; @@ -661,24 +659,6 @@ void AsmMatcherInfo::BuildInfo(CodeGenTarget &Target) { Instructions.push_back(II.take()); } - // Bind user super classes. - std::map<unsigned, ClassInfo*> UserClasses; - for (unsigned i = 0, e = Classes.size(); i != e; ++i) { - ClassInfo &CI = *Classes[i]; - if (CI.isUserClass()) - UserClasses[CI.Kind] = &CI; - } - - for (unsigned i = 0, e = Classes.size(); i != e; ++i) { - ClassInfo &CI = *Classes[i]; - if (CI.isUserClass() && CI.SuperClassKind != ClassInfo::Invalid) { - CI.SuperClass = UserClasses[CI.SuperClassKind]; - assert(CI.SuperClass && "Missing super class definition!"); - } else { - CI.SuperClass = 0; - } - } - // Reorder classes so that classes preceed super classes. std::sort(Classes.begin(), Classes.end(), less_ptr<ClassInfo>()); } @@ -863,8 +843,8 @@ static void EmitClassifyOperand(CodeGenTarget &Target, OS << " assert(Operand." << CI.SuperClass->PredicateMethod << "() && \"Invalid class relationship!\");\n"; - OS << " return " << CI.Name << ";\n\n"; - OS << " }"; + OS << " return " << CI.Name << ";\n"; + OS << " }\n\n"; } } OS << " return InvalidMatchClass;\n"; |