[cfe-commits] r51371 - /cfe/trunk/lib/CodeGen/CGExpr.cpp
Eli Friedman
eli.friedman at gmail.com
Wed May 21 06:24:44 PDT 2008
Author: efriedma
Date: Wed May 21 08:24:44 2008
New Revision: 51371
URL: http://llvm.org/viewvc/llvm-project?rev=51371&view=rev
Log:
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.
Modified:
cfe/trunk/lib/CodeGen/CGExpr.cpp
Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=51371&r1=51370&r2=51371&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Wed May 21 08:24:44 2008
@@ -571,12 +571,10 @@
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");
- }
+ unsigned AS = BaseTy->getAddressSpace();
+ V = Builder.CreateBitCast(V,
+ llvm::PointerType::get(FieldTy, AS),
+ "tmp");
}
if (!Field->isBitField())
More information about the cfe-commits
mailing list