Skip to content

Commit b14f3e5

Browse files
denismerigouxeddyb
authored andcommitted
Adapt code to latest rustc master changes
1 parent 441a7c1 commit b14f3e5

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/librustc_codegen_llvm/debuginfo/metadata.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,13 +2013,7 @@ pub fn create_vtable_metadata(
20132013
llvm::LLVMRustDIBuilderCreateStaticVariable(DIB(cx),
20142014
NO_SCOPE_METADATA,
20152015
name.as_ptr(),
2016-
// LLVM 3.9
2017-
// doesn't accept
2018-
// null here, so
2019-
// pass the name
2020-
// as the linkage
2021-
// name.
2022-
name.as_ptr(),
2016+
ptr::null(),
20232017
unknown_file_metadata(cx),
20242018
UNKNOWN_LINE_NUMBER,
20252019
vtable_type,

src/librustc_codegen_llvm/declare.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
use llvm;
2424
use llvm::AttributePlace::Function;
2525
use rustc::ty::{self, PolyFnSig};
26-
use rustc::ty::layout::{self, LayoutOf};
26+
use rustc::ty::layout::LayoutOf;
2727
use rustc::session::config::Sanitizer;
2828
use rustc_data_structures::small_c_str::SmallCStr;
2929
use rustc_target::spec::PanicStrategy;
@@ -144,7 +144,7 @@ impl DeclareMethods<'tcx> for CodegenCx<'ll, 'tcx> {
144144
let fty = FnType::new(self, sig, &[]);
145145
let llfn = declare_raw_fn(self, name, fty.llvm_cconv(), fty.llvm_type(self));
146146

147-
if self.layout_of(sig.output()).abi == layout::Abi::Uninhabited {
147+
if self.layout_of(sig.output()).abi.is_uninhabited() {
148148
llvm::Attribute::NoReturn.apply_llfn(Function, llfn);
149149
}
150150

0 commit comments

Comments
 (0)