summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-07-14 01:29:45 +0000
committerChris Lattner <sabre@nondot.org>2007-07-14 01:29:45 +0000
commit4481b428db0f778ac919ddab7443a602e7cf25f4 (patch)
treeb8d33b5d835db074b872e69efe4e06c550acbfa8 /clang/CodeGen/CodeGenFunction.cpp
parent9d3b0e0001411cc54aef84947285f663dce960d6 (diff)
downloadbcm5719-llvm-4481b428db0f778ac919ddab7443a602e7cf25f4.tar.gz
bcm5719-llvm-4481b428db0f778ac919ddab7443a602e7cf25f4.zip
A significant refactoring of the type size stuff to also
compute type alignment. This info is needed for struct layout. llvm-svn: 39850
Diffstat (limited to 'clang/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/CodeGen/CodeGenFunction.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/CodeGen/CodeGenFunction.cpp b/clang/CodeGen/CodeGenFunction.cpp
index 662c3b513c9..0cdda6c77cd 100644
--- a/clang/CodeGen/CodeGenFunction.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud