[all-commits] [llvm/llvm-project] d73c8c: [AMDGPU] Replace OperandMatchResultTy with ParseSt...

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


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

  Changed paths:
    M llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
    M llvm/lib/Target/AMDGPU/SIInstrInfo.td

  Log Message:
  -----------
  [AMDGPU] 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: kosarev

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




More information about the All-commits mailing list