Skip to content

Commit dc7fe2b

Browse files
committed
---
yaml --- r: 234558 b: refs/heads/tmp c: 3ef75d5 h: refs/heads/master v: v3
1 parent 94c8ca1 commit dc7fe2b

File tree

10 files changed

+34
-1
lines changed

10 files changed

+34
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: d2e13e822a73e0ea46ae9e21afdd3155fc997f6d
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: e4e67bd489934702e4958a03bb4c948919d38920
28+
refs/heads/tmp: 3ef75d5774cb9a7cf839a69341c620b98fa9c7df
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: ab792abf1fcc28afbd315426213f6428da25c085
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/src/libcore/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
#![feature(optin_builtin_traits)]
8080
#![feature(reflect)]
8181
#![feature(rustc_attrs)]
82+
#![feature(unwind_attributes)]
8283
#![cfg_attr(stage0, feature(simd))]
8384
#![cfg_attr(not(stage0), feature(repr_simd, platform_intrinsics))]
8485
#![feature(staged_api)]

branches/tmp/src/libcore/panicking.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ pub fn panic_fmt(fmt: fmt::Arguments, file_line: &(&'static str, u32)) -> ! {
6262
#[allow(improper_ctypes)]
6363
extern {
6464
#[lang = "panic_fmt"]
65+
#[unwind]
6566
fn panic_impl(fmt: fmt::Arguments, file: &'static str, line: u32) -> !;
6667
}
6768
let (file, line) = *file_line;

branches/tmp/src/librustc_trans/trans/foreign.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ pub fn register_foreign_item_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
211211
let llfn_ty = lltype_for_fn_from_foreign_types(ccx, &tys);
212212

213213
let llfn = get_extern_fn(ccx, &mut *ccx.externs().borrow_mut(), name, cc, llfn_ty, fty);
214+
attributes::unwind(llfn, false);
214215
add_argument_attributes(&tys, llfn);
215216
attributes::from_fn_attrs(ccx, attrs, llfn);
216217
llfn

branches/tmp/src/libstd/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
#![feature(unique)]
244244
#![feature(unsafe_no_drop_flag, filling_drop)]
245245
#![feature(decode_utf16)]
246+
#![feature(unwind_attributes)]
246247
#![feature(vec_push_all)]
247248
#![feature(vec_resize)]
248249
#![feature(wrapping)]

branches/tmp/src/libstd/sys/common/libunwind.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,12 @@ extern "C" {
124124
// iOS on armv7 uses SjLj exceptions and requires to link
125125
// against corresponding routine (..._SjLj_...)
126126
#[cfg(not(all(target_os = "ios", target_arch = "arm")))]
127+
#[unwind]
127128
pub fn _Unwind_RaiseException(exception: *mut _Unwind_Exception)
128129
-> _Unwind_Reason_Code;
129130

130131
#[cfg(all(target_os = "ios", target_arch = "arm"))]
132+
#[unwind]
131133
fn _Unwind_SjLj_RaiseException(e: *mut _Unwind_Exception)
132134
-> _Unwind_Reason_Code;
133135

branches/tmp/src/libstd/sys/common/unwind/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ fn rust_panic(cause: Box<Any + Send + 'static>) -> ! {
192192
#[cfg(not(test))]
193193
/// Entry point of panic from the libcore crate.
194194
#[lang = "panic_fmt"]
195+
#[unwind]
195196
pub extern fn rust_begin_unwind(msg: fmt::Arguments,
196197
file: &'static str, line: u32) -> ! {
197198
begin_unwind_fmt(msg, &(file, line))

branches/tmp/src/libstd/sys/common/unwind/seh.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ static PANIC_DATA: StaticKey = StaticKey::new(None);
6262

6363
// This function is provided by kernel32.dll
6464
extern "system" {
65+
#[unwind]
6566
fn RaiseException(dwExceptionCode: DWORD,
6667
dwExceptionFlags: DWORD,
6768
nNumberOfArguments: DWORD,

branches/tmp/src/libstd/sys/common/unwind/seh64_gnu.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ pub enum EXCEPTION_DISPOSITION {
9393

9494
// From kernel32.dll
9595
extern "system" {
96+
#[unwind]
9697
fn RaiseException(dwExceptionCode: DWORD,
9798
dwExceptionFlags: DWORD,
9899
nNumberOfArguments: DWORD,
@@ -198,6 +199,7 @@ unsafe extern fn rust_eh_personality(
198199

199200
#[lang = "eh_unwind_resume"]
200201
#[cfg(not(test))]
202+
#[unwind]
201203
unsafe extern fn rust_eh_unwind_resume(panic_ctx: LPVOID) {
202204
let params = [panic_ctx as ULONG_PTR];
203205
RaiseException(RUST_PANIC,
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// compile-flags: -C no-prepopulate-passes
12+
13+
#![feature(unwind_attributes)]
14+
15+
extern {
16+
// CHECK: Function Attrs: nounwind
17+
// CHECK-NEXT: declare void @extern_fn
18+
fn extern_fn();
19+
// CHECK-NOT: Function Attrs: nounwind
20+
// CHECK: declare void @unwinding_extern_fn
21+
#[unwind]
22+
fn unwinding_extern_fn();
23+
}

0 commit comments

Comments
 (0)