Remove an unnecessary/buggy if check. Ran into this with some other

changes in my tree, so I don't have a testcase which affects trunk.

llvm-svn: 51371
This commit is contained in:
Eli Friedman 2008-05-21 13:24:44 +00:00
parent 43f6b67135
commit 9a5ffcb14e
1 changed files with 4 additions and 6 deletions

View File

@ -571,13 +571,11 @@ LValue CodeGenFunction::EmitLValueForField(llvm::Value* BaseValue,
const llvm::Type * FieldTy = ConvertType(Field->getType());
const llvm::PointerType * BaseTy =
cast<llvm::PointerType>(BaseValue->getType());
if (FieldTy != BaseTy->getElementType()) {
unsigned AS = BaseTy->getAddressSpace();
V = Builder.CreateBitCast(V,
llvm::PointerType::get(FieldTy, AS),
"tmp");
}
}
if (!Field->isBitField())
return LValue::MakeAddr(V);