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),
|
llvm::LLVMRustDIBuilderCreateStaticVariable(DIB(cx),
|
||||||
NO_SCOPE_METADATA,
|
NO_SCOPE_METADATA,
|
||||||
name.as_ptr(),
|
name.as_ptr(),
|
||||||
// LLVM 3.9
|
ptr::null(),
|
||||||
// doesn't accept
|
|
||||||
// null here, so
|
|
||||||
// pass the name
|
|
||||||
// as the linkage
|
|
||||||
// name.
|
|
||||||
name.as_ptr(),
|
|
||||||
unknown_file_metadata(cx),
|
unknown_file_metadata(cx),
|
||||||
UNKNOWN_LINE_NUMBER,
|
UNKNOWN_LINE_NUMBER,
|
||||||
vtable_type,
|
vtable_type,
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
use llvm;
|
use llvm;
|
||||||
use llvm::AttributePlace::Function;
|
use llvm::AttributePlace::Function;
|
||||||
use rustc::ty::{self, PolyFnSig};
|
use rustc::ty::{self, PolyFnSig};
|
||||||
use rustc::ty::layout::{self, LayoutOf};
|
use rustc::ty::layout::LayoutOf;
|
||||||
use rustc::session::config::Sanitizer;
|
use rustc::session::config::Sanitizer;
|
||||||
use rustc_data_structures::small_c_str::SmallCStr;
|
use rustc_data_structures::small_c_str::SmallCStr;
|
||||||
use rustc_target::spec::PanicStrategy;
|
use rustc_target::spec::PanicStrategy;
|
||||||
|
@ -144,7 +144,7 @@ impl DeclareMethods<'tcx> for CodegenCx<'ll, 'tcx> {
|
||||||
let fty = FnType::new(self, sig, &[]);
|
let fty = FnType::new(self, sig, &[]);
|
||||||
let llfn = declare_raw_fn(self, name, fty.llvm_cconv(), fty.llvm_type(self));
|
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);
|
llvm::Attribute::NoReturn.apply_llfn(Function, llfn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue