llvm::NearMissInfo

Information about one near-miss encoding when instruction matching fails.

Synopsis

Declared in <llvm/MC/MCParser/MCTargetAsmParser.h>

class NearMissInfo;

Description

When matching of an assembly instruction fails, there may be multiple encodings that are close to being a match. It's often ambiguous which one the programmer intended to use, so we want to report an error which mentions each of these "near-miss" encodings. This struct contains information about one such encoding, and why it did not match the parsed instruction.

Enums

NameDescription
NearMissKind Classification of why an encoding was a near miss.

Member Functions

NameDescription
getFeatures Return features required by the instruction but missing on the target.
getKind Return the near-miss kind.
getOpcode Return the opcode of the encoding that was nearly matched.
getOperandClass Return the expected operand class that did not match.
getOperandError Return the operand-validation error code.
getOperandIndex Return the index of the mismatched operand in the parsed list.
getPredicateError Return the target predicate error code for this encoding.
operator bool Return true if this describes an actual near miss.

Static Member Functions

NameDescription
getMissedFeature Return a near miss for missing target features.
getMissedOperand Return a near miss for a single incorrect operand.
getMissedPredicate Return a near miss from a failed target predicate.
getSuccess Return a success sentinel used internally by the table-generated matcher.
getTooFewOperands Return a near miss when too few operands were parsed.

Data Members

NameDescription
Features [variant member]Features required but not enabled for a feature near miss.
MissedOperand [variant member]Details of a single mismatched operand.
PredicateError [variant member]Target predicate error code for a predicate near miss.
TooFewOperands [variant member]Details when too few operands were provided.