1
Fork 0

Adapt code to latest rustc master changes

This commit is contained in:
Denis Merigoux 2018-09-24 10:51:13 +02:00 committed by Eduard-Mihai Burtescu
parent 441a7c1092
commit b14f3e5490
2 changed files with 3 additions and 9 deletions

View file

@ -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,

View file

@ -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);
}