Skip to content

Commit fa1a172

Browse files
committed
Removed unnecessary check from build.rs
1 parent a9f2132 commit fa1a172

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/librustc/middle/trans/build.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -541,10 +541,7 @@ pub fn AtomicLoad(cx: block, PointerVal: ValueRef, order: AtomicOrdering) -> Val
541541
unsafe {
542542
let ccx = cx.fcx.ccx;
543543
if cx.unreachable {
544-
let ty = val_ty(PointerVal);
545-
let eltty = if llvm::LLVMGetTypeKind(ty) == lib::llvm::Array {
546-
llvm::LLVMGetElementType(ty) } else { ccx.int_type };
547-
return llvm::LLVMGetUndef(eltty);
544+
return llvm::LLVMGetUndef(ccx.int_type);
548545
}
549546
count_insn(cx, "load.atomic");
550547
return llvm::LLVMBuildAtomicLoad(B(cx), PointerVal, order);

0 commit comments

Comments
 (0)