[all-commits] [llvm/llvm-project] 4c691a: [M68k] Replace OperandMatchResultTy with ParseStat...

Sergei Barannikov via All-commits all-commits at lists.llvm.org
Tue Jul 4 12:20:18 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c691aedd37fb065c411dd246527dde61a56321b
      https://github.com/llvm/llvm-project/commit/4c691aedd37fb065c411dd246527dde61a56321b
  Author: Sergei Barannikov <barannikov88 at gmail.com>
  Date:   2023-07-04 (Tue, 04 Jul 2023)

  Changed paths:
    M llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp

  Log Message:
  -----------
  [M68k] Replace OperandMatchResultTy with ParseStatus (NFC)

ParseStatus is slightly more convenient to use due to implicit
conversion from bool, which allows to do something like:
```
  return Error(L, "msg");
```
when with MatchOperandResultTy it had to be:
```
  Error(L, "msg");
  return MatchOperand_ParseFail;
```
It also has more appropriate name since parse* methods are not only for
parsing operands.

Reviewed By: myhsu

Differential Revision: https://reviews.llvm.org/D154320




More information about the All-commits mailing list