From 199c3d6cd16aebbb9c7f0d42af9d922c9628bf70 Mon Sep 17 00:00:00 2001 From: Ken Dyck Date: Mon, 11 Jan 2010 17:06:35 +0000 Subject: Roll out ASTContext::getTypeSizeInChars(), replacing instances of "ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits ones as appropriate. Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType, fromQuantity(), and getQuantity() for clarity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93153 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 7999721e2c..3592c5ca80 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -578,7 +578,7 @@ llvm::Value *CodeGenFunction::EmitVLASize(QualType Ty) { ElemSize = EmitVLASize(ElemTy); else ElemSize = llvm::ConstantInt::get(SizeTy, - getContext().getTypeSize(ElemTy) / 8); + getContext().getTypeSizeInChars(ElemTy).getQuantity()); llvm::Value *NumElements = EmitScalarExpr(VAT->getSizeExpr()); NumElements = Builder.CreateIntCast(NumElements, SizeTy, false, "tmp"); -- cgit v1.2.3-18-g5258