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 {
2828 pub fn get_parent ( & self ) -> Option < & Function > {
2929 unsafe { util:: ptr_to_null ( core:: LLVMGetBasicBlockParent ( self . into ( ) ) ) }
3030 }
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+ }
3143 /// Move this basic block after the `other` basic block in its function.
3244 pub fn move_after ( & self , other : & BasicBlock ) {
3345 unsafe { core:: LLVMMoveBasicBlockAfter ( self . into ( ) , other. into ( ) ) }
You can’t perform that action at this time.
0 commit comments