Skip to content

Commit e331a76

Browse files
committed
---
yaml --- r: 63434 b: refs/heads/snap-stage3 c: 1079e41 h: refs/heads/master v: v3
1 parent 55cfefd commit e331a76

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 6cc318978796ca67e9350561601dee9931c1da12
4+
refs/heads/snap-stage3: 1079e41143e2f94fc0f969b967aaf89b2f4448a2
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/lib/llvm.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,12 @@ pub mod llvm {
966966
-> BasicBlockRef;
967967
#[fast_ffi]
968968
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);
969975

970976
/* Operations on instructions */
971977
#[fast_ffi]

branches/snap-stage3/src/librustc/middle/trans/base.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1907,6 +1907,8 @@ pub fn trans_closure(ccx: @mut CrateContext,
19071907

19081908
finish(bcx);
19091909
cleanup_and_Br(bcx, bcx_top, fcx.llreturn);
1910+
1911+
unsafe { llvm::LLVMMoveBasicBlockAfter(fcx.llreturn, bcx.llbb); }
19101912

19111913
// Insert the mandatory first few basic blocks before lltop.
19121914
finish_fn(fcx, lltop);

0 commit comments

Comments
 (0)