[llvm-commits] [llvm-gcc-4.2] r92940 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Dale Johannesen
dalej at apple.com
Thu Jan 7 12:53:04 PST 2010
Author: johannes
Date: Thu Jan 7 14:53:03 2010
New Revision: 92940
URL: http://llvm.org/viewvc/llvm-project?rev=92940&view=rev
Log:
Fix a bug introduced in 90914: use the size of the
return type, not of a pointer to the return type. This
fixes some regressions in the struct-layout-1 part
of the gcc testsuite on darwin x86-64.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=92940&r1=92939&r2=92940&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Thu Jan 7 14:53:03 2010
@@ -2776,7 +2776,9 @@
return 0;
if (Client.isAggrReturn()) {
- if (TD.getTypeAllocSize(Call->getType()) <= TD.getTypeAllocSize(DestLoc->Ptr->getType())) {
+ if (TD.getTypeAllocSize(Call->getType()) <=
+ TD.getTypeAllocSize(cast<PointerType>(DestLoc->Ptr->getType())
+ ->getElementType())) {
Value *Dest = BitCastToType(DestLoc->Ptr, Call->getType()->getPointerTo());
LLVM_EXTRACT_MULTIPLE_RETURN_VALUE(Call,Dest,DestLoc->Volatile,Builder);
} else {
More information about the llvm-commits
mailing list