Adapt code to latest rustc master changes
This commit is contained in:
parent
441a7c1092
commit
b14f3e5490
2 changed files with 3 additions and 9 deletions
|
@ -2013,13 +2013,7 @@ pub fn create_vtable_metadata(
|
|||
llvm::LLVMRustDIBuilderCreateStaticVariable(DIB(cx),
|
||||
NO_SCOPE_METADATA,
|
||||
name.as_ptr(),
|
||||
// LLVM 3.9
|
||||
// doesn't accept
|
||||
// null here, so
|
||||
// pass the name
|
||||
// as the linkage
|
||||
// name.
|
||||
name.as_ptr(),
|
||||
ptr::null(),
|
||||
unknown_file_metadata(cx),
|
||||
UNKNOWN_LINE_NUMBER,
|
||||
vtable_type,
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
use llvm;
|
||||
use llvm::AttributePlace::Function;
|
||||
use rustc::ty::{self, PolyFnSig};
|
||||
use rustc::ty::layout::{self, LayoutOf};
|
||||
use rustc::ty::layout::LayoutOf;
|
||||
use rustc::session::config::Sanitizer;
|
||||
use rustc_data_structures::small_c_str::SmallCStr;
|
||||
use rustc_target::spec::PanicStrategy;
|
||||
|
@ -144,7 +144,7 @@ impl DeclareMethods<'tcx> for CodegenCx<'ll, 'tcx> {
|
|||
let fty = FnType::new(self, sig, &[]);
|
||||
let llfn = declare_raw_fn(self, name, fty.llvm_cconv(), fty.llvm_type(self));
|
||||
|
||||
if self.layout_of(sig.output()).abi == layout::Abi::Uninhabited {
|
||||
if self.layout_of(sig.output()).abi.is_uninhabited() {
|
||||
llvm::Attribute::NoReturn.apply_llfn(Function, llfn);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue