From fa1a172f9c8b5071a7bc9d818bfa6ae26401ec5b Mon Sep 17 00:00:00 2001 From: Matthijs Hofstra Date: Mon, 13 May 2013 00:12:14 +0200 Subject: [PATCH] Removed unnecessary check from build.rs --- src/librustc/middle/trans/build.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/librustc/middle/trans/build.rs b/src/librustc/middle/trans/build.rs index 6fb22508714..b2af91887ec 100644 --- a/src/librustc/middle/trans/build.rs +++ b/src/librustc/middle/trans/build.rs @@ -541,10 +541,7 @@ pub fn AtomicLoad(cx: block, PointerVal: ValueRef, order: AtomicOrdering) -> Val unsafe { let ccx = cx.fcx.ccx; if cx.unreachable { - let ty = val_ty(PointerVal); - let eltty = if llvm::LLVMGetTypeKind(ty) == lib::llvm::Array { - llvm::LLVMGetElementType(ty) } else { ccx.int_type }; - return llvm::LLVMGetUndef(eltty); + return llvm::LLVMGetUndef(ccx.int_type); } count_insn(cx, "load.atomic"); return llvm::LLVMBuildAtomicLoad(B(cx), PointerVal, order);