MIR Serialization: Serialize the unnamed basic block references.

This commit serializes the references from the machine basic blocks to the
unnamed basic blocks.

This commit adds a new attribute to the machine basic block's YAML mapping
called 'ir-block'. This attribute contains the actual reference to the
basic block.

Reviewers: Duncan P. N. Exon Smith
llvm-svn: 243340
diff --git a/llvm/test/CodeGen/MIR/machine-basic-block-expected-ir-block.mir b/llvm/test/CodeGen/MIR/machine-basic-block-expected-ir-block.mir
new file mode 100644
index 0000000..2f3d40a
--- /dev/null
+++ b/llvm/test/CodeGen/MIR/machine-basic-block-expected-ir-block.mir
@@ -0,0 +1,16 @@
+# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
+
+--- |
+
+  define i32 @foo() {
+    ret i32 0
+  }
+
+...
+---
+name:            foo
+body:
+ - id:           0
+# CHECK: [[@LINE+1]]:19: expected an IR block reference
+   ir-block:     '0'
+...