[PATCH] D96218: [RISCV] Change parseVTypeI function
    luxufan via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Feb 11 23:13:19 PST 2021
    
    
  
StephenFan updated this revision to Diff 323228.
StephenFan added a comment.
Address craig.topper 's comment
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96218/new/
https://reviews.llvm.org/D96218
Files:
  llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
Index: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
===================================================================
--- llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+++ llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
@@ -1506,7 +1506,7 @@
     getLexer().Lex();
     if (getLexer().is(AsmToken::EndOfStatement))
       break;
-    if (!getLexer().is(AsmToken::Comma))
+    if (getLexer().isNot(AsmToken::Comma))
       goto MatchFail;
     AsmToken Comma = getLexer().getTok();
     VTypeIElements.push_back(Comma);
@@ -1571,7 +1571,7 @@
 
 // If NoMatch, unlex all the tokens that comprise a vtypei operand
 MatchFail:
-  while (VTypeIElements.size() > 0)
+  while (!VTypeIElements.empty())
     getLexer().UnLex(VTypeIElements.pop_back_val());
   return MatchOperand_NoMatch;
 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96218.323228.patch
Type: text/x-patch
Size: 800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210212/b1577db3/attachment.bin>
    
    
More information about the llvm-commits
mailing list