My question is simple. Given an instruction of type branch, how do I extract the label out of it? For example:
br label %while.cond
Should give me while.cond
br label %while.end
Should give me while.end
br i1 %cmp1, label %if.then, label %if.end
Should give me if, if.then, if.end respectively.
I use the following code segment to get all the above information that you have asked.