]> granicus.if.org Git - llvm/commitdiff
[RISCV] Unbreak the build
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 17 Sep 2019 14:27:31 +0000 (14:27 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 17 Sep 2019 14:27:31 +0000 (14:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372127 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp

index 999bc8bdb65525d2266b146793e5ac0ed03e9e09..8612af39c2ea7ea9db72f48d193ba6fa0928b37e 100644 (file)
@@ -986,11 +986,11 @@ bool RISCVAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
 static bool matchRegisterNameHelper(bool IsRV32E, Register &RegNo,
                                     StringRef Name) {
   RegNo = MatchRegisterName(Name);
-  if (RegNo == NoRegister)
+  if (RegNo == RISCV::NoRegister)
     RegNo = MatchRegisterAltName(Name);
   if (IsRV32E && RegNo >= RISCV::X16 && RegNo <= RISCV::X31)
-    RegNo = NoRegister;
-  return RegNo == NoRegister;
+    RegNo = RISCV::NoRegister;
+  return RegNo == RISCV::NoRegister;
 }
 
 bool RISCVAsmParser::ParseRegister(unsigned &RegNo, SMLoc &StartLoc,
@@ -1036,7 +1036,7 @@ OperandMatchResultTy RISCVAsmParser::parseRegister(OperandVector &Operands,
     Register RegNo;
     matchRegisterNameHelper(isRV32E(), RegNo, Name);
 
-    if (RegNo == NoRegister) {
+    if (RegNo == RISCV::NoRegister) {
       if (HadParens)
         getLexer().UnLex(LParen);
       return MatchOperand_NoMatch;