mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
TableGen: AsmMatcher support for better operand diagnostics.
"Invalid operand" may be a completely correct diagnostic, but it's often insufficiently specific to really help identify and fix the problem in assembly source. Allow a target to specify a more-specific diagnostic kind for each AsmOperandClass derived definition and use that to provide more detailed diagnostics when an operant of that class resulted in a match failure. rdar://8987109 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159050 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -523,6 +523,11 @@ class AsmOperandClass {
|
||||
/// to immediates or registers and are very instruction specific (as flags to
|
||||
/// set in a processor register, coprocessor number, ...).
|
||||
string ParserMethod = ?;
|
||||
|
||||
// The diagnostic type to present when referencing this operand in a
|
||||
// match failure error message. By default, use a generic "invalid operand"
|
||||
// diagnostic. The target AsmParser maps these codes to text.
|
||||
string DiagnosticType = "";
|
||||
}
|
||||
|
||||
def ImmAsmOperand : AsmOperandClass {
|
||||
|
Reference in New Issue
Block a user