[cfe-commits] r130109 - /cfe/trunk/lib/CodeGen/CGExprAgg.cpp
Ken Dyck
kd at kendyck.com
Sun Apr 24 10:02:38 PDT 2011
Author: kjdyck
Date: Sun Apr 24 12:02:38 2011
New Revision: 130109
URL: http://llvm.org/viewvc/llvm-project?rev=130109&view=rev
Log:
Replace calls to ASTContext::getTypeInfo() with calls to
ASTContext::getTypeSize() when only the size part is used. No change in
functionality intended.
Modified:
cfe/trunk/lib/CodeGen/CGExprAgg.cpp
Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=130109&r1=130108&r2=130109&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprAgg.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprAgg.cpp Sun Apr 24 12:02:38 2011
@@ -182,9 +182,7 @@
/// move will be performed.
void AggExprEmitter::EmitGCMove(const Expr *E, RValue Src) {
if (Dest.requiresGCollection()) {
- std::pair<uint64_t, unsigned> TypeInfo =
- CGF.getContext().getTypeInfo(E->getType());
- unsigned long size = TypeInfo.first/8;
+ uint64_t size = CGF.getContext().getTypeSize(E->getType())/8;
const llvm::Type *SizeTy = CGF.ConvertType(CGF.getContext().getSizeType());
llvm::Value *SizeVal = llvm::ConstantInt::get(SizeTy, size);
CGF.CGM.getObjCRuntime().EmitGCMemmoveCollectable(CGF, Dest.getAddr(),
@@ -215,9 +213,7 @@
}
if (Dest.requiresGCollection()) {
- std::pair<uint64_t, unsigned> TypeInfo =
- CGF.getContext().getTypeInfo(E->getType());
- unsigned long size = TypeInfo.first/8;
+ uint64_t size = CGF.getContext().getTypeSize(E->getType())/8;
const llvm::Type *SizeTy = CGF.ConvertType(CGF.getContext().getSizeType());
llvm::Value *SizeVal = llvm::ConstantInt::get(SizeTy, size);
CGF.CGM.getObjCRuntime().EmitGCMemmoveCollectable(CGF,
More information about the cfe-commits
mailing list