summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorKen Dyck <kd@kendyck.com>2011-04-24 17:02:38 +0000
committerKen Dyck <kd@kendyck.com>2011-04-24 17:02:38 +0000
commita8094505e2cb1017e5e83d8d0d9d6211fbcf31c5 (patch)
treede3f5e7248ccb9d588ba6c81e68d53676fd77297 /clang
parent272b6fa0f07b7ae3c584f83bf2a05a23596da0ac (diff)
downloadbcm5719-llvm-a8094505e2cb1017e5e83d8d0d9d6211fbcf31c5.tar.gz
bcm5719-llvm-a8094505e2cb1017e5e83d8d0d9d6211fbcf31c5.zip
Replace calls to ASTContext::getTypeInfo() with calls to
ASTContext::getTypeSize() when only the size part is used. No change in functionality intended. llvm-svn: 130109
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/CodeGen/CGExprAgg.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp
index 5b3c0905e54..db10ecede0b 100644
--- a/clang/lib/CodeGen/CGExprAgg.cpp
+++ b/clang/lib/CodeGen/CGExprAgg.cpp
@@ -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,
OpenPOWER on IntegriCloud