File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -966,6 +966,12 @@ pub mod llvm {
966
966
-> BasicBlockRef ;
967
967
#[ fast_ffi]
968
968
pub unsafe fn LLVMDeleteBasicBlock ( BB : BasicBlockRef ) ;
969
+
970
+ #[ fast_ffi]
971
+ pub unsafe fn LLVMMoveBasicBlockAfter ( BB : BasicBlockRef , MoveAfter : BasicBlockRef ) ;
972
+
973
+ #[ fast_ffi]
974
+ pub unsafe fn LLVMMoveBasicBlockBefore ( BB : BasicBlockRef , MoveBefore : BasicBlockRef ) ;
969
975
970
976
/* Operations on instructions */
971
977
#[ fast_ffi]
Original file line number Diff line number Diff line change @@ -1907,6 +1907,8 @@ pub fn trans_closure(ccx: @mut CrateContext,
1907
1907
1908
1908
finish ( bcx) ;
1909
1909
cleanup_and_Br ( bcx, bcx_top, fcx. llreturn ) ;
1910
+
1911
+ unsafe { llvm:: LLVMMoveBasicBlockAfter ( fcx. llreturn , bcx. llbb ) ; }
1910
1912
1911
1913
// Insert the mandatory first few basic blocks before lltop.
1912
1914
finish_fn ( fcx, lltop) ;
You can’t perform that action at this time.
0 commit comments