File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,18 @@ impl BasicBlock {
28
28
pub fn get_parent ( & self ) -> Option < & Function > {
29
29
unsafe { util:: ptr_to_null ( core:: LLVMGetBasicBlockParent ( self . into ( ) ) ) }
30
30
}
31
+ /// Return the terminator instruction for this basic block.
32
+ pub fn get_terminator ( & self ) -> Option < & Value > {
33
+ unsafe { util:: ptr_to_null ( core:: LLVMGetBasicBlockTerminator ( self . into ( ) ) ) }
34
+ }
35
+ /// Return the first instruction for this basic block.
36
+ pub fn get_first ( & self ) -> Option < & Value > {
37
+ unsafe { util:: ptr_to_null ( core:: LLVMGetFirstInstruction ( self . into ( ) ) ) }
38
+ }
39
+ /// Return the last instruction for this basic block.
40
+ pub fn get_last ( & self ) -> Option < & Value > {
41
+ unsafe { util:: ptr_to_null ( core:: LLVMGetLastInstruction ( self . into ( ) ) ) }
42
+ }
31
43
/// Move this basic block after the `other` basic block in its function.
32
44
pub fn move_after ( & self , other : & BasicBlock ) {
33
45
unsafe { core:: LLVMMoveBasicBlockAfter ( self . into ( ) , other. into ( ) ) }
You can’t perform that action at this time.
0 commit comments