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. llvm-svn: 93153
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user