Skip to content

Commit 9a05142

Browse files
committed
Adapted to lastest rustc master changes
1 parent c785979 commit 9a05142

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

src/librustc_codegen_llvm/declare.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl DeclareMethods<'ll, 'tcx> for CodegenCx<'ll, 'tcx, &'ll Value> {
130130
let fty = FnType::new(self, sig, &[]);
131131
let llfn = declare_raw_fn(self, name, fty.llvm_cconv(), fty.llvm_type(self));
132132

133-
if self.layout_of(sig.output()).abi.is_uninhabited() {
133+
if self.layout_of(sig.output()).abi == layout::Abi::Uninhabited {
134134
llvm::Attribute::NoReturn.apply_llfn(Function, llfn);
135135
}
136136

src/librustc_codegen_llvm/interfaces/builder.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use rustc_codegen_utils::common::{IntPredicate, RealPredicate, AtomicOrdering, SynchronizationScope, AtomicRmwBinOp, OperandBundleDef};
11+
use rustc_codegen_utils::common::{IntPredicate, RealPredicate, AtomicOrdering,
12+
SynchronizationScope, AtomicRmwBinOp, OperandBundleDef};
1213
use libc::c_char;
1314
use rustc::ty::TyCtxt;
1415
use rustc::ty::layout::{Align, Size};

src/librustc_codegen_llvm/interfaces/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub trait ConstMethods<'ll, 'tcx: 'll> : Backend<'ll> {
4141
// NB: Do not use `do_spill_noroot` to make this into a constant string, or
4242
// you will be kicked off fast isel. See issue #4352 for an example of this.
4343
fn const_str_slice(&self, s: LocalInternedString) -> Self::Value;
44-
44+
4545
fn const_fat_ptr(
4646
&self,
4747
ptr: Self::Value,

src/librustc_codegen_llvm/llvm/ffi.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ pub enum RealPredicate {
185185
impl RealPredicate {
186186
pub fn from_generic(realpred: rustc_codegen_utils::common::RealPredicate) -> Self {
187187
match realpred {
188-
rustc_codegen_utils::common::RealPredicate::RealPredicateFalse => RealPredicate::RealPredicateFalse,
188+
rustc_codegen_utils::common::RealPredicate::RealPredicateFalse =>
189+
RealPredicate::RealPredicateFalse,
189190
rustc_codegen_utils::common::RealPredicate::RealOEQ => RealPredicate::RealOEQ,
190191
rustc_codegen_utils::common::RealPredicate::RealOGT => RealPredicate::RealOGT,
191192
rustc_codegen_utils::common::RealPredicate::RealOGE => RealPredicate::RealOGE,
@@ -200,7 +201,8 @@ impl RealPredicate {
200201
rustc_codegen_utils::common::RealPredicate::RealULT => RealPredicate::RealULT,
201202
rustc_codegen_utils::common::RealPredicate::RealULE => RealPredicate::RealULE,
202203
rustc_codegen_utils::common::RealPredicate::RealUNE => RealPredicate::RealUNE,
203-
rustc_codegen_utils::common::RealPredicate::RealPredicateTrue => RealPredicate::RealPredicateTrue
204+
rustc_codegen_utils::common::RealPredicate::RealPredicateTrue =>
205+
RealPredicate::RealPredicateTrue
204206
}
205207
}
206208
}
@@ -310,7 +312,8 @@ impl AtomicOrdering {
310312
rustc_codegen_utils::common::AtomicOrdering::Monotonic => AtomicOrdering::Monotonic,
311313
rustc_codegen_utils::common::AtomicOrdering::Acquire => AtomicOrdering::Acquire,
312314
rustc_codegen_utils::common::AtomicOrdering::Release => AtomicOrdering::Release,
313-
rustc_codegen_utils::common::AtomicOrdering::AcquireRelease => AtomicOrdering::AcquireRelease,
315+
rustc_codegen_utils::common::AtomicOrdering::AcquireRelease =>
316+
AtomicOrdering::AcquireRelease,
314317
rustc_codegen_utils::common::AtomicOrdering::SequentiallyConsistent =>
315318
AtomicOrdering::SequentiallyConsistent
316319
}
@@ -332,9 +335,12 @@ pub enum SynchronizationScope {
332335
impl SynchronizationScope {
333336
pub fn from_generic(sc : rustc_codegen_utils::common::SynchronizationScope) -> Self {
334337
match sc {
335-
rustc_codegen_utils::common::SynchronizationScope::Other => SynchronizationScope::Other,
336-
rustc_codegen_utils::common::SynchronizationScope::SingleThread => SynchronizationScope::SingleThread,
337-
rustc_codegen_utils::common::SynchronizationScope::CrossThread => SynchronizationScope::CrossThread,
338+
rustc_codegen_utils::common::SynchronizationScope::Other =>
339+
SynchronizationScope::Other,
340+
rustc_codegen_utils::common::SynchronizationScope::SingleThread =>
341+
SynchronizationScope::SingleThread,
342+
rustc_codegen_utils::common::SynchronizationScope::CrossThread =>
343+
SynchronizationScope::CrossThread,
338344
}
339345
}
340346
}

0 commit comments

Comments
 (0)