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:
parent
43f6b67135
commit
9a5ffcb14e
|
@ -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())
|
||||||
|
|
Loading…
Reference in New Issue