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