Skip to content

Commit dbd1b68

Browse files
committed
---
yaml --- r: 234211 b: refs/heads/beta c: e4e67bd h: refs/heads/master i: 234209: f148773 234207: 0374f3b v: v3
1 parent 7a7471f commit dbd1b68

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 90c48bed25751f4c171b1555f8114234ca0a81c4
26+
refs/heads/beta: e4e67bd489934702e4958a03bb4c948919d38920
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustc_trans/trans/attributes.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ pub fn emit_uwtable(val: ValueRef, emit: bool) {
5959

6060
/// Tell LLVM whether the function can or cannot unwind.
6161
#[inline]
62-
#[allow(dead_code)] // possibly useful function
6362
pub fn unwind(val: ValueRef, can_unwind: bool) {
6463
if can_unwind {
6564
unsafe {
@@ -118,6 +117,8 @@ pub fn from_fn_attrs(ccx: &CrateContext, attrs: &[hir::Attribute], llfn: ValueRe
118117
}
119118
} else if attr.check_name("allocator") {
120119
llvm::Attribute::NoAlias.apply_llfn(llvm::ReturnIndex as c_uint, llfn);
120+
} else if attr.check_name("unwind") {
121+
unwind(llfn, true);
121122
}
122123
}
123124
}

branches/beta/src/libsyntax/feature_gate.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Option<u32>, Status
188188

189189
// allow `extern "platform-intrinsic" { ... }`
190190
("platform_intrinsics", "1.4.0", Some(27731), Active),
191+
192+
// allow `#[unwind]`
193+
("unwind_attributes", "1.4.0", None, Active),
191194
];
192195
// (changing above list without updating src/doc/reference.md makes @cmr sad)
193196

@@ -316,6 +319,7 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeGat
316319
("unsafe_no_drop_flag", Whitelisted, Gated("unsafe_no_drop_flag",
317320
"unsafe_no_drop_flag has unstable semantics \
318321
and may be removed in the future")),
322+
("unwind", Whitelisted, Gated("unwind_attributes", "#[unwind] is experimental")),
319323

320324
// used in resolve
321325
("prelude_import", Whitelisted, Gated("prelude_import",

0 commit comments

Comments
 (0)