]> granicus.if.org Git - clang/commitdiff
Replace calls to ASTContext::getTypeInfo() with calls to
authorKen Dyck <kd@kendyck.com>
Sun, 24 Apr 2011 17:02:38 +0000 (17:02 +0000)
committerKen Dyck <kd@kendyck.com>
Sun, 24 Apr 2011 17:02:38 +0000 (17:02 +0000)
ASTContext::getTypeSize() when only the size part is used. No change in
functionality intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130109 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExprAgg.cpp

index 5b3c0905e54ec457ff116b638098c403b5b4aee6..db10ecede0b9949ae4e3fc86e5110276b4229757 100644 (file)
@@ -182,9 +182,7 @@ bool AggExprEmitter::TypeRequiresGCollection(QualType T) {
 /// 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 @@ void AggExprEmitter::EmitFinalDestCopy(const Expr *E, RValue Src, bool Ignore) {
   }
 
   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,