Skip to content

Commit 1f8ca0a

Browse files
committed
---
yaml --- r: 15648 b: refs/heads/try c: fa6c68a h: refs/heads/master v: v3
1 parent c681d57 commit 1f8ca0a

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: a2f04efd593a6da5b9368ec85e02ed46631cb594
5+
refs/heads/try: fa6c68a025337072fd61fe3d5f71e7f079ce0652
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rustc/back/upcall.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ fn declare_upcalls(targ_cfg: @session::config,
3838
let mut arg_tys: [TypeRef] = [];
3939
for tys.each {|t| arg_tys += [t]; }
4040
let fn_ty = T_fn(arg_tys, rv);
41-
ret base::decl_cdecl_fn(llmod, prefix + name, fn_ty);
41+
let f = base::decl_cdecl_fn(llmod, prefix + name, fn_ty);
42+
if name != "fail" {
43+
base::set_no_unwind(f);
44+
}
45+
ret f;
4246
}
4347
let d = bind decl(llmod, "upcall_", _, _, _);
4448
let dv = bind decl(llmod, "upcall_", _, _, T_void());

branches/try/src/rustc/middle/trans/base.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,11 @@ fn set_no_inline(f: ValueRef) {
393393
0u as c_uint);
394394
}
395395

396+
fn set_no_unwind(f: ValueRef) {
397+
llvm::LLVMAddFunctionAttr(f, lib::llvm::NoUnwindAttribute as c_uint,
398+
0u as c_uint);
399+
}
400+
396401
// Tell LLVM to emit the information necessary to unwind the stack for the
397402
// function f.
398403
fn set_uwtable(f: ValueRef) {

0 commit comments

Comments
 (0)