MIR Serialization: Serialize unnamed local IR values in memory operands.
[oota-llvm.git] / lib / CodeGen / MIRParser / MILexer.cpp
index 94f38e48281217efc43c45d89401ad439b2bb730..6094ca996bf6fb7db10ba51bdf3d133f320170d1 100644 (file)
@@ -342,6 +342,8 @@ static Cursor maybeLexIRValue(
   const StringRef Rule = "%ir.";
   if (!C.remaining().startswith(Rule))
     return None;
+  if (isdigit(C.peek(Rule.size())))
+    return maybeLexIndex(C, Token, Rule, MIToken::IRValue);
   return lexName(C, Token, MIToken::NamedIRValue, Rule.size(), ErrorCallback);
 }