mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 13:10:34 +00:00
Have tblgen produce code that tolerates operands that return an invalid match class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135287 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
71400b6afa
commit
893818347e
@ -1656,6 +1656,10 @@ static void EmitValidateOperandClass(AsmMatcherInfo &Info,
|
||||
OS << " " << Info.Target.getName() << "Operand &Operand = *("
|
||||
<< Info.Target.getName() << "Operand*)GOp;\n";
|
||||
|
||||
// The InvalidMatchClass is not to match any operand.
|
||||
OS << " if (Kind == InvalidMatchClass)\n";
|
||||
OS << " return false;\n\n";
|
||||
|
||||
// Check for Token operands first.
|
||||
OS << " if (Operand.isToken())\n";
|
||||
OS << " return MatchTokenString(Operand.getToken()) == Kind;\n\n";
|
||||
|
Loading…
Reference in New Issue
Block a user