[llvm-commits] [llvm-gcc-4.2] r76172 - /llvm-gcc-4.2/trunk/gcc/llvm-abi.h
Duncan Sands
baldrick at free.fr
Fri Jul 17 04:22:44 PDT 2009
Author: baldrick
Date: Fri Jul 17 06:22:40 2009
New Revision: 76172
URL: http://llvm.org/viewvc/llvm-project?rev=76172&view=rev
Log:
Fix PR4214. Patch by Nathan Keynes.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-abi.h
Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-abi.h?rev=76172&r1=76171&r2=76172&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-abi.h (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-abi.h Fri Jul 17 06:22:40 2009
@@ -435,7 +435,12 @@
// Figure out if this field is zero bits wide, e.g. {} or [0 x int]. Do
// not include variable sized fields here.
std::vector<const Type*> Elts;
- if (isPassedByInvisibleReference(type)) { // variable size -> by-ref.
+ if( Ty->getTypeID() == Type::VoidTyID ) {
+ // Handle void explicitly as an opaque type.
+ const Type *OpTy = OpaqueType::get();
+ C.HandleScalarArgument(OpTy, type);
+ ScalarElts.push_back(OpTy);
+ } else if (isPassedByInvisibleReference(type)) { // variable size -> by-ref.
const Type *PtrTy = PointerType::getUnqual(Ty);
C.HandleByInvisibleReferenceArgument(PtrTy, type);
ScalarElts.push_back(PtrTy);
More information about the llvm-commits
mailing list