Skip to content

Commit 2bd23f3

Browse files
committed
---
yaml --- r: 274379 b: refs/heads/stable c: 118c93b h: refs/heads/master i: 274377: 3f1e125 274375: d531825
1 parent 60a5744 commit 2bd23f3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1064
-2184
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: ef1a13b6371bcebc15c850ab82f14688d994fd25
32+
refs/heads/stable: 118c93ba5e3be48c91fff1840fdc7bbe942c5f00
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/configure

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,14 @@ enable_if_not_disabled() {
334334
fi
335335
}
336336

337+
to_llvm_triple() {
338+
case $1 in
339+
i686-w64-mingw32) echo i686-pc-windows-gnu ;;
340+
x86_64-w64-mingw32) echo x86_64-pc-windows-gnu ;;
341+
*) echo $1 ;;
342+
esac
343+
}
344+
337345
to_gnu_triple() {
338346
case $1 in
339347
i686-pc-windows-gnu) echo i686-w64-mingw32 ;;
@@ -638,6 +646,12 @@ valopt_nosave host "${CFG_BUILD}" "GNUs ./configure syntax LLVM host triples"
638646
valopt_nosave target "${CFG_HOST}" "GNUs ./configure syntax LLVM target triples"
639647
valopt_nosave mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
640648

649+
# Temporarily support old triples until buildbots get updated
650+
CFG_BUILD=$(to_llvm_triple $CFG_BUILD)
651+
putvar CFG_BUILD # Yes, this creates a duplicate entry, but the last one wins.
652+
CFG_HOST=$(to_llvm_triple $CFG_HOST)
653+
CFG_TARGET=$(to_llvm_triple $CFG_TARGET)
654+
641655
# On Windows this determines root of the subtree for target libraries.
642656
# Host runtime libs always go to 'bin'.
643657
valopt libdir "${CFG_PREFIX}/lib" "install libraries"

branches/stable/mk/tests.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,8 +1039,6 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
10391039
export INCLUDE := $$(CFG_MSVC_INCLUDE_PATH_$$(HOST_$(3)))
10401040
$(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
10411041
export LIB := $$(CFG_MSVC_LIB_PATH_$$(HOST_$(3)))
1042-
$(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
1043-
export MSVC_LIB := "$$(CFG_MSVC_LIB_$$(HOST_$(3)))"
10441042
$(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
10451043
$(S)src/test/run-make/%/Makefile \
10461044
$$(CSREQ$(1)_T_$(2)_H_$(3))

branches/stable/src/libcore/intrinsics.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -552,15 +552,7 @@ extern "rust-intrinsic" {
552552
pub fn discriminant_value<T>(v: &T) -> u64;
553553

554554
/// Rust's "try catch" construct which invokes the function pointer `f` with
555-
/// the data pointer `data`.
556-
///
557-
/// The third pointer is a target-specific data pointer which is filled in
558-
/// with the specifics of the exception that occurred. For examples on Unix
559-
/// platforms this is a `*mut *mut T` which is filled in by the compiler and
560-
/// on MSVC it's `*mut [usize; 2]`. For more information see the compiler's
561-
/// source as well as std's catch implementation.
562-
#[cfg(not(stage0))]
563-
pub fn try(f: fn(*mut u8), data: *mut u8, local_ptr: *mut u8) -> i32;
564-
#[cfg(stage0)]
555+
/// the data pointer `data`, returning the exception payload if an exception
556+
/// is thrown (aka the thread panics).
565557
pub fn try(f: fn(*mut u8), data: *mut u8) -> *mut u8;
566558
}

branches/stable/src/librustc_back/target/x86_64_pc_windows_msvc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use target::Target;
1313
pub fn target() -> Target {
1414
let mut base = super::windows_msvc_base::opts();
1515
base.cpu = "x86-64".to_string();
16+
base.custom_unwind_resume = true;
1617

1718
Target {
1819
llvm_target: "x86_64-pc-windows-msvc".to_string(),

branches/stable/src/librustc_llvm/archive_ro.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ impl Drop for ArchiveRO {
7979
}
8080

8181
impl<'a> Iterator for Iter<'a> {
82-
type Item = Result<Child<'a>, String>;
82+
type Item = Child<'a>;
8383

84-
fn next(&mut self) -> Option<Result<Child<'a>, String>> {
84+
fn next(&mut self) -> Option<Child<'a>> {
8585
let ptr = unsafe { ::LLVMRustArchiveIteratorNext(self.ptr) };
8686
if ptr.is_null() {
87-
::last_error().map(Err)
87+
None
8888
} else {
89-
Some(Ok(Child { ptr: ptr, _data: marker::PhantomData }))
89+
Some(Child { ptr: ptr, _data: marker::PhantomData })
9090
}
9191
}
9292
}

branches/stable/src/librustc_llvm/lib.rs

Lines changed: 15 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub use self::DiagnosticSeverity::*;
5656
pub use self::Linkage::*;
5757
pub use self::DLLStorageClassTypes::*;
5858

59-
use std::ffi::{CString, CStr};
59+
use std::ffi::CString;
6060
use std::cell::RefCell;
6161
use std::slice;
6262
use libc::{c_uint, c_ushort, uint64_t, c_int, size_t, c_char};
@@ -544,9 +544,6 @@ pub type SMDiagnosticRef = *mut SMDiagnostic_opaque;
544544
#[allow(missing_copy_implementations)]
545545
pub enum RustArchiveMember_opaque {}
546546
pub type RustArchiveMemberRef = *mut RustArchiveMember_opaque;
547-
#[allow(missing_copy_implementations)]
548-
pub enum OperandBundleDef_opaque {}
549-
pub type OperandBundleDefRef = *mut OperandBundleDef_opaque;
550547

551548
pub type DiagnosticHandler = unsafe extern "C" fn(DiagnosticInfoRef, *mut c_void);
552549
pub type InlineAsmDiagHandler = unsafe extern "C" fn(SMDiagnosticRef, *const c_void, c_uint);
@@ -1152,15 +1149,14 @@ extern {
11521149
Addr: ValueRef,
11531150
NumDests: c_uint)
11541151
-> ValueRef;
1155-
pub fn LLVMRustBuildInvoke(B: BuilderRef,
1156-
Fn: ValueRef,
1157-
Args: *const ValueRef,
1158-
NumArgs: c_uint,
1159-
Then: BasicBlockRef,
1160-
Catch: BasicBlockRef,
1161-
Bundle: OperandBundleDefRef,
1162-
Name: *const c_char)
1163-
-> ValueRef;
1152+
pub fn LLVMBuildInvoke(B: BuilderRef,
1153+
Fn: ValueRef,
1154+
Args: *const ValueRef,
1155+
NumArgs: c_uint,
1156+
Then: BasicBlockRef,
1157+
Catch: BasicBlockRef,
1158+
Name: *const c_char)
1159+
-> ValueRef;
11641160
pub fn LLVMRustBuildLandingPad(B: BuilderRef,
11651161
Ty: TypeRef,
11661162
PersFn: ValueRef,
@@ -1171,31 +1167,6 @@ extern {
11711167
pub fn LLVMBuildResume(B: BuilderRef, Exn: ValueRef) -> ValueRef;
11721168
pub fn LLVMBuildUnreachable(B: BuilderRef) -> ValueRef;
11731169

1174-
pub fn LLVMRustBuildCleanupPad(B: BuilderRef,
1175-
ParentPad: ValueRef,
1176-
ArgCnt: c_uint,
1177-
Args: *const ValueRef,
1178-
Name: *const c_char) -> ValueRef;
1179-
pub fn LLVMRustBuildCleanupRet(B: BuilderRef,
1180-
CleanupPad: ValueRef,
1181-
UnwindBB: BasicBlockRef) -> ValueRef;
1182-
pub fn LLVMRustBuildCatchPad(B: BuilderRef,
1183-
ParentPad: ValueRef,
1184-
ArgCnt: c_uint,
1185-
Args: *const ValueRef,
1186-
Name: *const c_char) -> ValueRef;
1187-
pub fn LLVMRustBuildCatchRet(B: BuilderRef,
1188-
Pad: ValueRef,
1189-
BB: BasicBlockRef) -> ValueRef;
1190-
pub fn LLVMRustBuildCatchSwitch(Builder: BuilderRef,
1191-
ParentPad: ValueRef,
1192-
BB: BasicBlockRef,
1193-
NumHandlers: c_uint,
1194-
Name: *const c_char) -> ValueRef;
1195-
pub fn LLVMRustAddHandler(CatchSwitch: ValueRef,
1196-
Handler: BasicBlockRef);
1197-
pub fn LLVMRustSetPersonalityFn(B: BuilderRef, Pers: ValueRef);
1198-
11991170
/* Add a case to the switch instruction */
12001171
pub fn LLVMAddCase(Switch: ValueRef,
12011172
OnVal: ValueRef,
@@ -1505,13 +1476,12 @@ extern {
15051476
/* Miscellaneous instructions */
15061477
pub fn LLVMBuildPhi(B: BuilderRef, Ty: TypeRef, Name: *const c_char)
15071478
-> ValueRef;
1508-
pub fn LLVMRustBuildCall(B: BuilderRef,
1509-
Fn: ValueRef,
1510-
Args: *const ValueRef,
1511-
NumArgs: c_uint,
1512-
Bundle: OperandBundleDefRef,
1513-
Name: *const c_char)
1514-
-> ValueRef;
1479+
pub fn LLVMBuildCall(B: BuilderRef,
1480+
Fn: ValueRef,
1481+
Args: *const ValueRef,
1482+
NumArgs: c_uint,
1483+
Name: *const c_char)
1484+
-> ValueRef;
15151485
pub fn LLVMBuildSelect(B: BuilderRef,
15161486
If: ValueRef,
15171487
Then: ValueRef,
@@ -2156,12 +2126,6 @@ extern {
21562126
pub fn LLVMRustSetDataLayoutFromTargetMachine(M: ModuleRef,
21572127
TM: TargetMachineRef);
21582128
pub fn LLVMRustGetModuleDataLayout(M: ModuleRef) -> TargetDataRef;
2159-
2160-
pub fn LLVMRustBuildOperandBundleDef(Name: *const c_char,
2161-
Inputs: *const ValueRef,
2162-
NumInputs: c_uint)
2163-
-> OperandBundleDefRef;
2164-
pub fn LLVMRustFreeOperandBundleDef(Bundle: OperandBundleDefRef);
21652129
}
21662130

21672131
#[cfg(have_component_x86)]
@@ -2440,48 +2404,6 @@ pub fn initialize_available_targets() {
24402404
init_pnacl();
24412405
}
24422406

2443-
pub fn last_error() -> Option<String> {
2444-
unsafe {
2445-
let cstr = LLVMRustGetLastError();
2446-
if cstr.is_null() {
2447-
None
2448-
} else {
2449-
let err = CStr::from_ptr(cstr).to_bytes();
2450-
let err = String::from_utf8_lossy(err).to_string();
2451-
libc::free(cstr as *mut _);
2452-
Some(err)
2453-
}
2454-
}
2455-
}
2456-
2457-
pub struct OperandBundleDef {
2458-
inner: OperandBundleDefRef,
2459-
}
2460-
2461-
impl OperandBundleDef {
2462-
pub fn new(name: &str, vals: &[ValueRef]) -> OperandBundleDef {
2463-
let name = CString::new(name).unwrap();
2464-
let def = unsafe {
2465-
LLVMRustBuildOperandBundleDef(name.as_ptr(),
2466-
vals.as_ptr(),
2467-
vals.len() as c_uint)
2468-
};
2469-
OperandBundleDef { inner: def }
2470-
}
2471-
2472-
pub fn raw(&self) -> OperandBundleDefRef {
2473-
self.inner
2474-
}
2475-
}
2476-
2477-
impl Drop for OperandBundleDef {
2478-
fn drop(&mut self) {
2479-
unsafe {
2480-
LLVMRustFreeOperandBundleDef(self.inner);
2481-
}
2482-
}
2483-
}
2484-
24852407
// The module containing the native LLVM dependencies, generated by the build system
24862408
// Note that this must come after the rustllvm extern declaration so that
24872409
// parts of LLVM that rustllvm depends on aren't thrown away by the linker.

branches/stable/src/librustc_metadata/loader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ pub fn note_crate_name(err: &mut DiagnosticBuilder, name: &str) {
729729
impl ArchiveMetadata {
730730
fn new(ar: ArchiveRO) -> Option<ArchiveMetadata> {
731731
let data = {
732-
let section = ar.iter().filter_map(|s| s.ok()).find(|sect| {
732+
let section = ar.iter().find(|sect| {
733733
sect.name() == Some(METADATA_FILENAME)
734734
});
735735
match section {

0 commit comments

Comments
 (0)