Skip to content

Commit eb01d69

Browse files
committed
---
yaml --- r: 95382 b: refs/heads/dist-snap c: 45e2cf3 h: refs/heads/master v: v3
1 parent 3dc386c commit eb01d69

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: a7e8957c591651b6568d1b495d29ee85d11c0975
9+
refs/heads/dist-snap: 45e2cf39a21b6317e01adff05a3c83c628913edc
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustc/middle/trans/intrinsic.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,11 @@ pub fn trans_intrinsic(ccx: @mut CrateContext,
222222
}
223223

224224
match name {
225+
"abort" => {
226+
let llfn = bcx.ccx().intrinsics.get_copy(&("llvm.trap"));
227+
Call(bcx, llfn, [], []);
228+
RetVoid(bcx);
229+
}
225230
"size_of" => {
226231
let tp_ty = substs.tys[0];
227232
let lltp_ty = type_of::type_of(ccx, tp_ty);

branches/dist-snap/src/librustc/middle/typeck/check/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3585,6 +3585,7 @@ pub fn check_intrinsic_type(ccx: @mut CrateCtxt, it: @ast::foreign_item) {
35853585

35863586
} else {
35873587
match name {
3588+
"abort" => (0, ~[], ty::mk_bot()),
35883589
"size_of" |
35893590
"pref_align_of" | "min_align_of" => (1u, ~[], ty::mk_uint()),
35903591
"init" => (1u, ~[], param(ccx, 0u)),

branches/dist-snap/src/libstd/unstable/intrinsics.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ pub trait TyVisitor {
171171
}
172172

173173
extern "rust-intrinsic" {
174+
/// Abort the execution of the process.
175+
#[cfg(not(stage0))]
176+
pub fn abort() -> !;
174177

175178
/// Atomic compare and exchange, sequentially consistent.
176179
pub fn atomic_cxchg(dst: &mut int, old: int, src: int) -> int;

0 commit comments

Comments
 (0)