MIR Serialization: Serialize the memory operand's noalias metadata node.
[oota-llvm.git] / lib / CodeGen / MIRParser / MIParser.cpp
index 271f7f08227ca5df39ecfc8fcf7131bfa74aa777..57765b5b0cb7c269b076dceda427244a9dc9e8cb 100644 (file)
@@ -1543,11 +1543,16 @@ bool MIParser::parseMachineMemoryOperand(MachineMemOperand *&Dest) {
       if (parseMDNode(AAInfo.Scope))
         return true;
       break;
-    // TODO: Parse AA NoAlias metadata.
+    case MIToken::md_noalias:
+      lex();
+      if (parseMDNode(AAInfo.NoAlias))
+        return true;
+      break;
     // TODO: Parse the ranges metadata.
     // TODO: Report an error on duplicate metadata nodes.
     default:
-      return error("expected 'align' or '!tbaa' or '!alias.scope'");
+      return error(
+          "expected 'align' or '!tbaa' or '!alias.scope' or '!noalias'");
     }
   }
   if (expectAndConsume(MIToken::rparen))