Add the unconditional branch instruction, improve diagnostics for block
references.
PiperOrigin-RevId: 201872745
diff --git a/lib/IR/Instructions.cpp b/lib/IR/Instructions.cpp
index c123b86..c32e878 100644
--- a/lib/IR/Instructions.cpp
+++ b/lib/IR/Instructions.cpp
@@ -23,6 +23,10 @@
return getBlock()->getFunction();
}
-ReturnInst::ReturnInst(BasicBlock *block) : TerminatorInst(Kind::Return, block){
+ReturnInst::ReturnInst(BasicBlock *parent)
+ : TerminatorInst(Kind::Return, parent) {
}
+BranchInst::BranchInst(BasicBlock *dest, BasicBlock *parent)
+ : TerminatorInst(Kind::Branch, parent), dest(dest) {
+}