diff options
author | Eric Christopher <echristo@apple.com> | 2011-07-11 23:06:52 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-07-11 23:06:52 +0000 |
commit | d568b3f55294917d1cc701da14a8a7daeb6563e6 (patch) | |
tree | 44a2842bc0b635140d86fc4c7896e4ca1e2a6d87 /utils/TableGen/AsmMatcherEmitter.cpp | |
parent | d1c2bd8e6e37e08393f7c4980efc5bcb66b6f0d0 (diff) | |
download | external_llvm-d568b3f55294917d1cc701da14a8a7daeb6563e6.zip external_llvm-d568b3f55294917d1cc701da14a8a7daeb6563e6.tar.gz external_llvm-d568b3f55294917d1cc701da14a8a7daeb6563e6.tar.bz2 |
Revert r134921, 134917, 134908 and 134907. They're causing failures
in multiple buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134936 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/AsmMatcherEmitter.cpp')
-rw-r--r-- | utils/TableGen/AsmMatcherEmitter.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index 3236a19..d9c3b84 100644 --- a/utils/TableGen/AsmMatcherEmitter.cpp +++ b/utils/TableGen/AsmMatcherEmitter.cpp @@ -869,7 +869,7 @@ AsmMatcherInfo::getOperandClass(const CGIOperandList::OperandInfo &OI, int SubOpIdx) { Record *Rec = OI.Rec; if (SubOpIdx != -1) - Rec = dynamic_cast<const DefInit*>(OI.MIOperandInfo->getArg(SubOpIdx))->getDef(); + Rec = dynamic_cast<DefInit*>(OI.MIOperandInfo->getArg(SubOpIdx))->getDef(); if (Rec->isSubClassOf("RegisterOperand")) { // RegisterOperand may have an associated ParserMatchClass. If it does, @@ -879,7 +879,7 @@ AsmMatcherInfo::getOperandClass(const CGIOperandList::OperandInfo &OI, throw "Record `" + Rec->getName() + "' does not have a ParserMatchClass!\n"; - if (const DefInit *DI= dynamic_cast<const DefInit*>(R->getValue())) { + if (DefInit *DI= dynamic_cast<DefInit*>(R->getValue())) { Record *MatchClass = DI->getDef(); if (ClassInfo *CI = AsmOperandClasses[MatchClass]) return CI; @@ -1046,9 +1046,9 @@ void AsmMatcherInfo::BuildOperandClasses() { ClassInfo *CI = AsmOperandClasses[*it]; CI->Kind = ClassInfo::UserClass0 + Index; - const ListInit *Supers = (*it)->getValueAsListInit("SuperClasses"); + ListInit *Supers = (*it)->getValueAsListInit("SuperClasses"); for (unsigned i = 0, e = Supers->getSize(); i != e; ++i) { - const DefInit *DI = dynamic_cast<const DefInit*>(Supers->getElement(i)); + DefInit *DI = dynamic_cast<DefInit*>(Supers->getElement(i)); if (!DI) { PrintError((*it)->getLoc(), "Invalid super class reference!"); continue; @@ -1065,28 +1065,28 @@ void AsmMatcherInfo::BuildOperandClasses() { CI->ValueName = (*it)->getName(); // Get or construct the predicate method name. - const Init *PMName = (*it)->getValueInit("PredicateMethod"); - if (const StringInit *SI = dynamic_cast<const StringInit*>(PMName)) { + Init *PMName = (*it)->getValueInit("PredicateMethod"); + if (StringInit *SI = dynamic_cast<StringInit*>(PMName)) { CI->PredicateMethod = SI->getValue(); } else { - assert(dynamic_cast<const UnsetInit*>(PMName) && + assert(dynamic_cast<UnsetInit*>(PMName) && "Unexpected PredicateMethod field!"); CI->PredicateMethod = "is" + CI->ClassName; } // Get or construct the render method name. - const Init *RMName = (*it)->getValueInit("RenderMethod"); - if (const StringInit *SI = dynamic_cast<const StringInit*>(RMName)) { + Init *RMName = (*it)->getValueInit("RenderMethod"); + if (StringInit *SI = dynamic_cast<StringInit*>(RMName)) { CI->RenderMethod = SI->getValue(); } else { - assert(dynamic_cast<const UnsetInit*>(RMName) && + assert(dynamic_cast<UnsetInit*>(RMName) && "Unexpected RenderMethod field!"); CI->RenderMethod = "add" + CI->ClassName + "Operands"; } // Get the parse method name or leave it as empty. - const Init *PRMName = (*it)->getValueInit("ParserMethod"); - if (const StringInit *SI = dynamic_cast<const StringInit*>(PRMName)) + Init *PRMName = (*it)->getValueInit("ParserMethod"); + if (StringInit *SI = dynamic_cast<StringInit*>(PRMName)) CI->ParserMethod = SI->getValue(); AsmOperandClasses[*it] = CI; |