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.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.h') diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 8dbfb190df..30ad663771 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -17,6 +17,7 @@ #include "clang/AST/Type.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/ExprObjC.h" +#include "clang/AST/CharUnits.h" #include "clang/Basic/TargetInfo.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" @@ -463,7 +464,7 @@ public: llvm::Value *BuildBlockLiteralTmp(const BlockExpr *); llvm::Constant *BuildDescriptorBlockDecl(bool BlockHasCopyDispose, - uint64_t Size, + CharUnits Size, const llvm::StructType *, std::vector *); @@ -471,14 +472,14 @@ public: const BlockInfo& Info, const Decl *OuterFuncDecl, llvm::DenseMap ldm, - uint64_t &Size, uint64_t &Align, + CharUnits &Size, uint64_t &Align, llvm::SmallVector &subBlockDeclRefDecls, bool &subBlockHasCopyDispose); void BlockForwardSelf(); llvm::Value *LoadBlockStruct(); - uint64_t AllocateBlockDecl(const BlockDeclRefExpr *E); + CharUnits AllocateBlockDecl(const BlockDeclRefExpr *E); llvm::Value *GetAddrOfBlockDecl(const BlockDeclRefExpr *E); const llvm::Type *BuildByRefType(const ValueDecl *D); -- cgit v1.2.3-70-g09d2