[PATCH] D93548: [AMDGPU][MC][NFC] Parser refactoring

Dmitry Preobrazhensky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 18 08:53:49 PST 2020


dp created this revision.
dp added a reviewer: rampitec.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm.
dp requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

Minimized use of Parser.Lex() by using higher-level parse functions.
For example, a commonly used pattern

  if (getLexer().isNot(Tok)) { return err; } Parser.Lex();

may be replaced with the following code:

  if (!trySkipToken(Tok)) { return err; }


https://reviews.llvm.org/D93548

Files:
  llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93548.312813.patch
Type: text/x-patch
Size: 12282 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201218/2ab82a7b/attachment.bin>


More information about the llvm-commits mailing list