Skip to content

Conversation

@lenary
Copy link
Member

@lenary lenary commented Feb 11, 2025

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.

@lenary lenary requested a review from s-barannikov February 11, 2025 01:43
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.
@lenary lenary force-pushed the pr/remove-operand-match-result-ty branch from e6e1d81 to 56c252e Compare February 11, 2025 01:44
@lenary lenary added the llvm:mc Machine (object) code label Feb 11, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 11, 2025

@llvm/pr-subscribers-mc

Author: Sam Elliott (lenary)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/126650.diff

1 Files Affected:

  • (modified) llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h (+5-20)
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 {

Copy link
Contributor

@s-barannikov s-barannikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lenary lenary merged commit d222488 into llvm:main Feb 12, 2025
8 checks passed
@lenary lenary deleted the pr/remove-operand-match-result-ty branch February 12, 2025 05:59
@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 12, 2025

LLVM Buildbot has detected a new failure on builder clang-cmake-x86_64-avx512-win running on avx512-intel64-win while building llvm at step 4 "cmake stage 1".

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
Step 4 (cmake stage 1) failure: 'cmake -G ...' (failure)
'cmake' is not recognized as an internal or external command,
operable program or batch file.

flovent pushed a commit to flovent/llvm-project that referenced this pull request Feb 13, 2025
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.
joaosaffran pushed a commit to joaosaffran/llvm-project that referenced this pull request Feb 14, 2025
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.
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Feb 24, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llvm:mc Machine (object) code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants