From ee4ce61e628f3fc963a8b0e458330993a865ef7a Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Mon, 11 Mar 2019 03:48:39 -0300 Subject: [PATCH] Add name overload to OpLabel --- include/sirit/sirit.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/sirit/sirit.h b/include/sirit/sirit.h index abaa9ca..aac6fdb 100644 --- a/include/sirit/sirit.h +++ b/include/sirit/sirit.h @@ -176,10 +176,14 @@ public: /// Declare a structured selection. Id OpSelectionMerge(Id merge_block, spv::SelectionControlMask selection_control); - /// The block label instruction: Any reference to a block is through this - /// ref. + /// The block label instruction: Any reference to a block is through this ref. Id OpLabel(); + /// The block label instruction: Any reference to a block is through this ref. + Id OpLabel(const std::string label_name) { + return Name(OpLabel(), label_name); + } + /// Unconditional jump to label. Id OpBranch(Id target_label);