[cfe-commits] r100511 - /cfe/trunk/lib/CodeGen/CGExpr.cpp
Daniel Dunbar
daniel at zuster.org
Mon Apr 5 18:07:39 PDT 2010
Author: ddunbar
Date: Mon Apr 5 20:07:39 2010
New Revision: 100511
URL: http://llvm.org/viewvc/llvm-project?rev=100511&view=rev
Log:
Simplify.
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=100511&r1=100510&r2=100511&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Mon Apr 5 20:07:39 2010
@@ -1481,12 +1481,8 @@
cast<llvm::PointerType>(BaseValue->getType());
unsigned AS = BaseTy->getAddressSpace();
BaseValue = Builder.CreateBitCast(BaseValue,
- llvm::PointerType::get(FieldTy, AS),
- "tmp");
-
- llvm::Value *Idx =
- llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), Info.FieldNo);
- llvm::Value *V = Builder.CreateGEP(BaseValue, Idx, "tmp");
+ llvm::PointerType::get(FieldTy, AS));
+ llvm::Value *V = Builder.CreateConstGEP1_32(BaseValue, Info.FieldNo);
return LValue::MakeBitfield(V, Info, Field->getType()->isSignedIntegerType(),
Field->getType().getCVRQualifiers()|CVRQualifiers);
More information about the cfe-commits
mailing list