Skip to content

Commit ccb3f7b

Browse files
lenaryflovent
authored andcommitted
[AsmParser] Remove OperandMatchResultTy (llvm#126650)
This has been deprecated since a479be0 from September 2023, before LLVM 18. Surely now enough release cycles have happened that it can be removed upstream.
1 parent 76bb67a commit ccb3f7b

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h

+5-20
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,13 @@ struct ParseInstructionInfo {
122122
: AsmRewrites(rewrites) {}
123123
};
124124

125-
enum OperandMatchResultTy {
126-
MatchOperand_Success, // operand matched successfully
127-
MatchOperand_NoMatch, // operand did not match
128-
MatchOperand_ParseFail // operand matched but had errors
129-
};
130-
131125
/// Ternary parse status returned by various parse* methods.
132126
class ParseStatus {
133-
enum class StatusTy { Success, Failure, NoMatch } Status;
127+
enum class StatusTy {
128+
Success, // Parsing Succeeded
129+
Failure, // Parsing Failed after consuming some tokens
130+
NoMatch, // Parsing Failed without consuming any tokens
131+
} Status;
134132

135133
public:
136134
#if __cplusplus >= 202002L
@@ -152,19 +150,6 @@ class ParseStatus {
152150
constexpr bool isSuccess() const { return Status == StatusTy::Success; }
153151
constexpr bool isFailure() const { return Status == StatusTy::Failure; }
154152
constexpr bool isNoMatch() const { return Status == StatusTy::NoMatch; }
155-
156-
// Allow implicit conversions to / from OperandMatchResultTy.
157-
LLVM_DEPRECATED("Migrate to ParseStatus", "")
158-
constexpr ParseStatus(OperandMatchResultTy R)
159-
: Status(R == MatchOperand_Success ? Success
160-
: R == MatchOperand_ParseFail ? Failure
161-
: NoMatch) {}
162-
LLVM_DEPRECATED("Migrate to ParseStatus", "")
163-
constexpr operator OperandMatchResultTy() const {
164-
return isSuccess() ? MatchOperand_Success
165-
: isFailure() ? MatchOperand_ParseFail
166-
: MatchOperand_NoMatch;
167-
}
168153
};
169154

170155
enum class DiagnosticPredicateTy {

0 commit comments

Comments
 (0)