about summary refs log tree commit diff
path: root/src/rustc/back
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-04-25 15:38:56 -0700
committerGraydon Hoare <graydon@mozilla.com>2012-04-25 17:19:36 -0700
commitfa6c68a025337072fd61fe3d5f71e7f079ce0652 (patch)
treebfba15d6501a7cd827daffaa1a0ea1f3de9b34e5 /src/rustc/back
parenta2f04efd593a6da5b9368ec85e02ed46631cb594 (diff)
downloadrust-fa6c68a025337072fd61fe3d5f71e7f079ce0652.tar.gz
rust-fa6c68a025337072fd61fe3d5f71e7f079ce0652.zip
Set no-unwind attribute on all upcalls other than fail.
Diffstat (limited to 'src/rustc/back')
-rw-r--r--src/rustc/back/upcall.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rustc/back/upcall.rs b/src/rustc/back/upcall.rs
index f43ef4a5c12..d3946a5de14 100644
--- a/src/rustc/back/upcall.rs
+++ b/src/rustc/back/upcall.rs
@@ -38,7 +38,11 @@ fn declare_upcalls(targ_cfg: @session::config,
         let mut arg_tys: [TypeRef] = [];
         for tys.each {|t| arg_tys += [t]; }
         let fn_ty = T_fn(arg_tys, rv);
-        ret base::decl_cdecl_fn(llmod, prefix + name, fn_ty);
+        let f = base::decl_cdecl_fn(llmod, prefix + name, fn_ty);
+        if name != "fail" {
+            base::set_no_unwind(f);
+        }
+        ret f;
     }
     let d = bind decl(llmod, "upcall_", _, _, _);
     let dv = bind decl(llmod, "upcall_", _, _, T_void());