-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[AsmParser] Remove OperandMatchResultTy #126650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
e6e1d81 to
56c252e
Compare
|
@llvm/pr-subscribers-mc Author: Sam Elliott (lenary) ChangesThis has been deprecated since a479be0 from September 2023, before LLVM 18. Surely now enough release cycles have happened that it can be removed upstream. Full diff: https://github.com/llvm/llvm-project/pull/126650.diff 1 Files Affected:
diff --git a/llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h b/llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h
index 4c88448e6a1285a..6df8b56925d9f1c 100644
--- a/llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h
+++ b/llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h
@@ -122,15 +122,13 @@ struct ParseInstructionInfo {
: AsmRewrites(rewrites) {}
};
-enum OperandMatchResultTy {
- MatchOperand_Success, // operand matched successfully
- MatchOperand_NoMatch, // operand did not match
- MatchOperand_ParseFail // operand matched but had errors
-};
-
/// Ternary parse status returned by various parse* methods.
class ParseStatus {
- enum class StatusTy { Success, Failure, NoMatch } Status;
+ enum class StatusTy {
+ Success, // operand matched successfully
+ Failure, // operand matched but had errors
+ NoMatch // operand did not match
+ } Status;
public:
#if __cplusplus >= 202002L
@@ -152,19 +150,6 @@ class ParseStatus {
constexpr bool isSuccess() const { return Status == StatusTy::Success; }
constexpr bool isFailure() const { return Status == StatusTy::Failure; }
constexpr bool isNoMatch() const { return Status == StatusTy::NoMatch; }
-
- // Allow implicit conversions to / from OperandMatchResultTy.
- LLVM_DEPRECATED("Migrate to ParseStatus", "")
- constexpr ParseStatus(OperandMatchResultTy R)
- : Status(R == MatchOperand_Success ? Success
- : R == MatchOperand_ParseFail ? Failure
- : NoMatch) {}
- LLVM_DEPRECATED("Migrate to ParseStatus", "")
- constexpr operator OperandMatchResultTy() const {
- return isSuccess() ? MatchOperand_Success
- : isFailure() ? MatchOperand_ParseFail
- : MatchOperand_NoMatch;
- }
};
enum class DiagnosticPredicateTy {
|
s-barannikov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/81/builds/4644 Here is the relevant piece of the build log for the reference |
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.
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.
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.
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.