diff options
author | Chris Lattner <sabre@nondot.org> | 2007-07-14 01:29:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-07-14 01:29:45 +0000 |
commit | d2d2a11a91d7ddf468bfb70f66362d24806ed601 (patch) | |
tree | 1920f1ccb6fc00b05bbd9d884dd821601d906626 /CodeGen/CodeGenFunction.cpp | |
parent | 8f32f7189b12f67aa4a19bc7c3855b599980eca0 (diff) |
A significant refactoring of the type size stuff to also
compute type alignment. This info is needed for struct layout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39850 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | CodeGen/CodeGenFunction.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CodeGen/CodeGenFunction.cpp b/CodeGen/CodeGenFunction.cpp index 662c3b513c..0cdda6c77c 100644 --- a/CodeGen/CodeGenFunction.cpp +++ b/CodeGen/CodeGenFunction.cpp @@ -51,7 +51,9 @@ bool CodeGenFunction::hasAggregateLLVMType(QualType T) { void CodeGenFunction::GenerateCode(const FunctionDecl *FD) { LLVMIntTy = ConvertType(getContext().IntTy); - LLVMPointerWidth = Target.getPointerWidth(SourceLocation()); + LLVMPointerWidth = + getContext().getTypeSize(getContext().getPointerType(getContext().VoidTy), + SourceLocation()); CurFn = cast<llvm::Function>(CGM.GetAddrOfGlobalDecl(FD)); CurFuncDecl = FD; |